mp3info_0.8.5a.orig/ChangeLog0000644000000000000000000001363710763631155016216 0ustar00usergroup00000000000000v0.8.5a - Fixed possible buffer overflow condition in gmp3info (Klaus Singvogel) v0.8.5 - Added 'make install-mp3info' and 'make install-gmp3info' options to Makefile (Felix Kronlage) - Fixed a bug in the windows version that caused it to blow up or give erroneous output on certain MP3 files - Added handling of 'free form' bitrate frames, the lack of which was causing segfaults on AMD 64-bit sytems - Tweaked code to eliminate various gcc warnings and errors - Improved detection of invalid MP3 frames (Ben Bennett) - Updated gmp3info for GTK 2 (Eric Lassauge) - Miscellaneous documentation updates and corrections v0.8.4 - Added %k format specifier to allow printing of the file size in formatted text output (-p option) (Thanks to Sascha Luedecke ) - Rearranged some items in the man page and quick help (-h) to make them more readable. - Fixed minor logic bug in mp3tech (pointed out by Moshe Jacobson ) - Now compiles under CYGWIN32 (Julia A. Case ). - The following fixes were contributed by Pawel Wiecek - Manual page typos fixed - Now correctly recognizes and reports MPEG version 2.5 files - Clearing individual ID3 fields can now be accomplished by passing a blank argument ("") to any tag setting switch (-t, -a, etc.) v0.8.3 - Fixed a bug in GTK version that showed garbage or nothing where track information should have been displayed. - Fixed a bug that prevented the interactive curses version from changing from one genre to another if the second genre contained fewer characters than the first. - Ricardo Cerqueria contributed the following enhancements: - Added a FILE | OPEN menu to the GTK version - Added a technical information view to the GTK version - Added an 'About' box to GTK version v0.8.2 - Fixed a bug which caused mp3info to erroneously report some constant bitrate (CBR) files as variable bitrate (VBR) files. v0.8.1 - Fixed an elusive bug that sometimes caused mp3info to fail to find an ID3 tag even when one was present. v0.8 - Added the ability to handle VBR (Variable Bit Rate) MP3 files - Added the ability to deal with garbage or non-standard headers at the beginning of a file - Added user-specifiable output format with capabilities similar to printf(3) - The GTK version now handles read-only files correctly - Techincal Info display (-x) greatly improved and is now considered reliable. - UNIX man page created for mp3info (console version only) - Major internal code re-engineering v0.7 - Added extended genres (taken from WinAmp). - Fixed minor bug in genre list display - Fixed a bug in the GTK version which set the genre to 'Blues' if the MP3 file did not have an existing ID3 tag. - Help screen and documentation fixed up and edited for clarity. - Added -f switch to force MP3Info to process files as if they were MP3's even if they don't contain the standard MP3 header. - Added support for ID3 v1.1 tags (track numbers) - Thanks to Don Melton (don@blivet.com) - Added an option (-x) to display technical information about the MP3 file. This is an experimental feature and should not be considered reliable. v0.6.1 - Fixed a bug introduced in 0.6 that set genre to 'Blues' if no genre was given on the command line and the MP3 file did not have an existing ID3 tag. v0.6 - As of this version maintenance of mp3info has been taken over by Cedric Tefft - Reworked command-line/curses version to handle processing multiple MP3's. - Added the capability to delete an existing ID3 tag (-d switch) - Added full text/numeric genre handling to command-line, curses and GTK modes. - Added the capability to display the list of valid genres (-G switch) - View mode is now determined automatically when no other options are specified. The -v option is accepted for backward compatibility, but ignored. It should probably be removed in a future version. - Added ID3 structure to make internal argument passing a little cleaner. - Consolidated ID3 tag reading/writing code. - Interactive mode now displays existing tags. - Modified Makefile to make gmp3info dependant on gmp3info.c v0.5 - Added genre tag. (Still in numerical form) (Thanks to jsc@arsdigita.com) - Corrected a byte ordering bug which affected Sun systems (Thanks to Benjamin Korvemaker) - Corrected a permissions bug (Thanks to Carsten Hahn) - Fixed a GTK bug in gmp3info. (Thanks go to Thomas Schultz) v0.4 - gmp3info is now part of the pack. Fixed some incompatibity problems with SGI (thanks again to Petter) and RedHat 6.0. - Added MP3 check, using the magic number (Thanks to Steven James for this one) v0.3.1 - Fixed a couple of HP/UX incompatibilities (Thanks to Petter Reinholdtsen) - Added -v (to view an existing tag) v0.3 - Fixed "trash in the fields" bug. (Strings are now forced to be null-terminated) Updated help screen. Fixed minor warnings during compile. If "-h" is among options, others are now ignored. "-i" now must be specified for interactive (curses) mode. Commented and cleaned code. v0.3-b1 - Added reading and preservation of existing tags in command line mode. Fixed occasional tag seek bug. Changed options parsing to use "getopt" v0.3-a1 - Merged the command line version back in. Fixed "tag appending instead of overwriting" bug v0.2-b1 - Fixed "non-existant file is created" bug. Added a help screen Field lengths became constants. v0.2-a2 - A few minor bugfixes. - Added ^C support (terminal was going crazy if the program was interrupted) - Added flexible window size (window width is always equal to terminal width) v0.2-a1 - Not released - curses version. Weeeeeee! (Way better :-) ) v0.1.1 - Not released - Added support for the "Year" and "Comment" fields. - Fixed quite a few overflow problems v0.1 - Initial version. Never released mp3info_0.8.5a.orig/INSTALL0000644000000000000000000000522710763631155015471 0ustar00usergroup00000000000000Installing the Windows version ============================== There really is no formal installation procedure. MP3Info is a single executable that has no dependencies and uses no registry entries. If you want to make mp3info available from anywhere on your system, you can copy mp3info.exe to a directory in your system path. This command would do the trick: copy mp3info.exe %SYSTEMROOT% Installing MP3info from source (UNIX) ===================================== Unpack and decompress the archive file, then change the current working directory to the directory created by unpacking the archive. The following two commands should accomplish this: tar -xzvf mp3info-x.y.tgz cd mp3info-x.y Next, edit the top of the Makefile and make any changes necessary to reflect your environment. The defaults are valid for Red Hat and Fedora Linux systems, but will probably work for many others. Next, run the following two commands. make make install (this command must be run by the root user) If you want to install just the console version use: make mp3info make install-mp3info (this command must be run by the root user) If you want to install just the GTK version use: make gmp3info make install-gmp3info (this command must be run by the root user) ... and that's it. There should be a binary named mp3info and/or another named gmp3info in /usr/local/bin (or whatever you changed the 'prefix' variable to in the Makefile). Troubleshooting =============== If 'make install' results in an error like the following: install: cannot create regular file `/usr/local/man/man1/mp3info.1': No such file or directory you probably need to go back and edit the 'manpath' setting in the Makefile. The manpath variable must reflect one of your system's repositories for manual pages -- specifically for section 1 manual pages (so specifying /foo/bar/man would not be sufficient -- you would need to specify /foo/bar/man/man1 or /foo/bar/man/sman1 or whatever reflects reality). If you have trouble determining where your system's man pages are stored, try examining your MANPATH environment variable or see man's own man page (i.e run 'man 1 man'). Installing the pre-compiled binaries ==================================== Run the following command as the root user. Note that you must have the RedHat Package Manager (RPM) installed. If you don't have RPM installed on your system, you can get it from the RedHat web site (www.redhat.com), but you will probably find it easier just to build from source code. rpm -ivh mp3info-x.y-z.i386.rpm If you are upgrading from a previous version of MP3Info, use this command: rpm -Uvh mp3info-x.y-z.i386.rpm mp3info_0.8.5a.orig/LICENSE0000644000000000000000000004307610763631155015451 0ustar00usergroup00000000000000 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. mp3info_0.8.5a.orig/Makefile0000644000000000000000000000446310763631155016101 0ustar00usergroup00000000000000# Makefile for MP3Info and GMP3Info # # Copyright (C) 2000-2006 Cedric Tefft # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You 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. # # *************************************************************************** # # This program is based in part on: # # * MP3Info 0.5 by Ricardo Cerqueira # * MP3Stat 0.9 by Ed Sweetman and # Johannes Overmann # # bindir = where binaries get installed (default = /usr/local/bin) # mandir = where the manual page gets installed (default = /usr/local/man/man1) prefix=/usr/local bindir=${prefix}/bin mandir = $(prefix)/man/man1 # No changes necessary below this line PROG = mp3info SRCS = mp3info.c textfunc.c mp3curs.c mp3tech.c OBJS = mp3info.o textfunc.o mp3curs.o mp3tech.o XSRC = gmp3info.c XOBJ = mp3tech.o RM = /bin/rm INSTALL = /usr/bin/install -c STRIP = strip LIBS = -lncurses CC = gcc CFLAGS = -g -O2 -Wall all: mp3info gmp3info doc doc: mp3info.txt mp3info: $(OBJS) $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) gmp3info: $(XSRC) $(XOBJ) $(CC) $(XSRC) $(CFLAGS) -o $@ $(XOBJ) `pkg-config --cflags --libs gtk+-2.0` mp3info.txt: mp3info.1 groff -t -e -mandoc -Tascii mp3info.1 | col -bx > mp3info.txt clean: $(RM) -f $(OBJS) $(XOBJ) mp3info gmp3info core dist: clean doc distclean: clean $(RM) -f mp3info.txt install-mp3info: mp3info $(STRIP) mp3info $(INSTALL) mp3info $(bindir)/mp3info $(INSTALL) mp3info.1 $(mandir)/mp3info.1 install-gmp3info: gmp3info $(STRIP) gmp3info $(INSTALL) gmp3info $(bindir)/gmp3info install: install-mp3info install-gmp3info uninstall: rm -f $(bindir)/mp3info rm -f $(bindir)/gmp3info rm -f $(mandir)/mp3info.1 mp3info_0.8.5a.orig/README0000644000000000000000000001170710763631155015320 0ustar00usergroup00000000000000MP3info - An MP3 technical info viewer and ID3 1.x tag editor ABOUT ===== Q: What's MP3Info? A: MP3Info is a little utility used to read and modify the ID3 tags of MP3 files. MP3Info can also display various technical aspects of an MP3 file including playing time, bit-rate, sampling frequency and other attributes in a pre-defined or user-specifiable output format. Q: OK, so what's an 'MP3'? A: For those of you who have been living in a cave for the past decade, an MP3 (short for MPEG 1, layer 3) is a very popular digital audio file format which encodes an audio file with a lossy compression algorithm resulting in files representing a minute of near-CD quality stereo sound in less than a megabyte of data. Compare this to non-compressed formats (Windows .WAV files for instance) which encode the same minute of audio in about ten megabytes of data. Q: What's an 'ID3 tag'? A: An ID3 tag is a little scrap of data added to the beginning or end of the MP3 file which stores information about the audio recording including the title, artist, album, copyright date, and musical genre. ID3 tags are an optional feature of the MP3 format, so not all MP3 files have ID3 tags. HISTORY ======= MP3Info was originally written by Ricardo Cerqueira . Cedric Tefft took over maintenance in January 2000 and has been the primary maintainer ever since. Over the years a number of patches, suggestions and bug reports have been submitted by countless individuals, some of whom are credited in the ChangeLog. PORTABILITY =========== MP3Info was developed under Linux, but should work on most UN*X variants. Included with the text-based version is a GUI version which requires the GTK libraries (see http://www.gtk.org). The console version runs in plain command-line and interactive curses mode. The curses or ncurses library is required. The command-line version can also be compiled for Windows, but a precompiled Windows binary is included in the source distribution and as a separate Windows-specific package. There is currently no GUI version for Windows. OBTAINING THE LATEST VERSION OF MP3INFO ======================================= MP3Info's home is the public library archive at ibiblio.org (formerly MetaLab, formerly SunSite). Both source and i386 RPM's (for Linux) are available as well as the aforementioned Windows executable. HOMEPAGE http://ibiblio.org/mp3info/ PRIMARY DOWNLOAD ftp://ftp.ibiblio.org/pub/linux/apps/sound/mp3-utils/mp3info http://ibiblio.org/pub/linux/apps/sound/mp3-utils/mp3info MIRRORS ftp://ftp.freesoftware.com/pub/linux/sunsite/apps/sound/mp3-utils/mp3info/ ftp://ftp.twoguys.org/linux/apps/sound/mp3-utils/mp3info/ The entire ibiblio Linux archive (including MP3Info) is mirrored to many other locations around the world. A full and current list of ibiblio mirrors can be found at http://ibiblio.org/pub/Linux/MIRRORS.html INSTALLATION ============ See the file 'INSTALL' for build and installation instructions on UNIX platforms. See win32\INSTALL-WINDOWS.txt for installation of the Windows binary. Help/Usage/HowTo (Console Version) ================================== MP3Info is fully documented in its manual page. To view the manual page on a UNIX platform, simply type 'man mp3info' at any time after installation. If you don't have groff installed on your system or for some other reason can't read the man page, a text-only version is available in the file mp3info.txt There is also an HTML version of the manual page included as mp3info.html. This is considered the the primary help file for Windows users. Usage: GTK Version ================== gmp3info [song.mp3] DISCLAIMER ========== I do not take responsibility for damaged files, MP3s or not. BUGS & CAVEATS ============== Known bugs and limitations are detailed in the manual page. If you have any bug reports or patches, please email them to me. Bugs get fixed a lot faster if you include patches -- especially if the problem is platform specific. TO DO ===== * ID3v2 support is the most often-requested feature and is badly needed, however this will entail an almost complete rewrite and I'm a lazy SOB, so it's going to be a while yet... Anybody wanna volunteer? * Make format specifiers a bit more flexible (allow user to choose int/float/string display arbitrarily and provide some mechanism for convenient magnitude displays of large numbers (KB for kilobytes, MB for megabytes, etc.) * Add line-editing capabilities to curses version (I have a user-contributed patch, but it's a little broken) * Make exit codes more useful and document them better (i.e. return 1 if no ID3 found, 2 if MP3 is corrupt, 3 if the file wasn't found or something along those lines). * Add capability to copy ID3 tags from one file to another * Add -p format specifiers for: * Maximum and minimum bitrates * File index (first file = 0, second file = 1, etc.) - Cedric Tefft November 6, 2006 mp3info_0.8.5a.orig/gmp3info.c0000644000000000000000000004657610763631155016342 0ustar00usergroup00000000000000/* GMP3Info - Displays and allows editing of MP3 ID3 tags and various technical aspects of MP3 files (GTK interface) gmp3info.c - main part of GTK version of MP3Info Copyright (C) 2000-2006 Cedric Tefft This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You 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. *************************************************************************** rmc, Feb/2001 - Added a file open dialog Added the Tech Info Window Added an about box GMP3Info can now be launched without an argument */ #include #include #define __MAIN #include "mp3info.h" #undef __MAIN gchar *gtext_genre(unsigned char genre); unsigned char gget_genre (char *genre); int kill_if_esc(GtkWidget *widget, GdkEventKey *event, gpointer obj); void create_techinfo_win(void); void open_mp3_file(void); int load_mp3(char *filename); void read_new_mp3(GtkWidget *button, GtkWidget *file); void quick_popup(char *title, char *message); void about_mp3info(void); GtkWidget *id3win,*id3win_frame_global; GtkWidget *id3win_frame_title,*id3win_frame_artist,*id3win_frame_album; GtkWidget *id3win_frame_year,*id3win_frame_comment, *id3win_frame_albyear; GtkWidget *id3win_frame_genre,*id3win_frame_track,*id3win_frame_comtrack; GtkWidget *id3win_text_title,*id3win_text_artist,*id3win_text_album; GtkWidget *id3win_text_year,*id3win_text_comment,*id3win_combo_genre; GtkWidget *id3win_text_track; GtkWidget *id3win_frame_buttons,*id3win_ok_button,*id3win_cancel_button; GtkWidget *id3win_menu_bar, *id3win_menu_file, *id3win_menu_fcont; GtkWidget *id3win_menu_info, *id3win_menu_open, *id3win_menu_help; GtkWidget *id3win_menu_hcont, *id3win_menu_about; GList *genrelist=NULL; gchar track[4]="",fbuf[4]; unsigned char genre=255; FILE *fp; unsigned char sig[2]; unsigned int track_num; mp3info mp3; int read_only=0; void exit_save( GtkWidget *widget, GtkWidget *data) { char tmp[31]; if (mp3.file) { if(!read_only) { strcpy(mp3.id3.title,gtk_entry_get_text(GTK_ENTRY(id3win_text_title))); strcpy(mp3.id3.artist,gtk_entry_get_text(GTK_ENTRY(id3win_text_artist))); strcpy(mp3.id3.album,gtk_entry_get_text(GTK_ENTRY(id3win_text_album))); strcpy(mp3.id3.year,gtk_entry_get_text(GTK_ENTRY(id3win_text_year))); strcpy(mp3.id3.comment,gtk_entry_get_text(GTK_ENTRY(id3win_text_comment))); strcpy(tmp,gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(id3win_combo_genre)->entry))); mp3.id3.genre[0]=gget_genre(tmp); strcpy(tmp,gtk_entry_get_text(GTK_ENTRY(id3win_text_track))); mp3.id3.track[0]=atoi(tmp); /* if (mp3.id3.track[0] > 255) mp3.id3.track[0]=255; */ write_tag(&mp3); } fclose(mp3.file); } gtk_main_quit(); } int main(int argc, char *argv[] ) { int i; char track_text[4]; gtk_init (&argc, &argv); id3win=gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_window_set_title(GTK_WINDOW(id3win),"MP3info - An ID3 tag editor"); gtk_window_set_policy (GTK_WINDOW(id3win), FALSE,FALSE,FALSE); gtk_widget_set_usize(id3win,450,360); gtk_container_border_width(GTK_CONTAINER(id3win),5); gtk_signal_connect(GTK_OBJECT(id3win), "delete_event", (GtkSignalFunc) gtk_exit, NULL); id3win_frame_global=gtk_vbox_new(FALSE,5); /* rmcc was here */ id3win_menu_bar = gtk_menu_bar_new(); gtk_widget_show(id3win_menu_bar); gtk_box_pack_start(GTK_BOX(id3win_frame_global), id3win_menu_bar, FALSE, TRUE, 1); id3win_menu_file = gtk_menu_item_new_with_label("File"); gtk_widget_show(id3win_menu_file); gtk_container_add(GTK_CONTAINER(id3win_menu_bar), id3win_menu_file); id3win_menu_fcont = gtk_menu_new(); gtk_menu_item_set_submenu(GTK_MENU_ITEM(id3win_menu_file), id3win_menu_fcont); id3win_menu_open = gtk_menu_item_new_with_label("Open New "); gtk_widget_show(id3win_menu_open); gtk_container_add(GTK_CONTAINER(id3win_menu_fcont), id3win_menu_open); gtk_signal_connect(GTK_OBJECT(id3win_menu_open), "activate", GTK_SIGNAL_FUNC(open_mp3_file), NULL); id3win_menu_info = gtk_menu_item_new_with_label("Info "); gtk_widget_show(id3win_menu_info); gtk_container_add(GTK_CONTAINER(id3win_menu_fcont), id3win_menu_info); gtk_signal_connect(GTK_OBJECT(id3win_menu_info), "activate", GTK_SIGNAL_FUNC(create_techinfo_win), NULL); id3win_menu_help = gtk_menu_item_new_with_label(" Help"); gtk_widget_show(id3win_menu_help); gtk_container_add(GTK_CONTAINER(id3win_menu_bar), id3win_menu_help); gtk_menu_item_right_justify(GTK_MENU_ITEM(id3win_menu_help)); id3win_menu_hcont = gtk_menu_new(); gtk_menu_item_set_submenu(GTK_MENU_ITEM(id3win_menu_help), id3win_menu_hcont); id3win_menu_about = gtk_menu_item_new_with_label("About "); gtk_widget_show(id3win_menu_about); gtk_container_add(GTK_CONTAINER(id3win_menu_hcont), id3win_menu_about); gtk_signal_connect(GTK_OBJECT(id3win_menu_about), "activate", GTK_SIGNAL_FUNC(about_mp3info), NULL); /* rmcc has left the building */ id3win_frame_title=gtk_frame_new("Title"); gtk_container_border_width(GTK_CONTAINER(id3win_frame_title),5); id3win_text_title=gtk_entry_new_with_max_length(30); gtk_container_add(GTK_CONTAINER(id3win_frame_title),id3win_text_title); gtk_box_pack_start(GTK_BOX(id3win_frame_global),id3win_frame_title,TRUE,TRUE,0); id3win_frame_artist=gtk_frame_new("Artist"); gtk_container_border_width(GTK_CONTAINER(id3win_frame_artist),5); id3win_text_artist=gtk_entry_new_with_max_length(30); gtk_container_add(GTK_CONTAINER(id3win_frame_artist),id3win_text_artist); gtk_box_pack_start(GTK_BOX(id3win_frame_global),id3win_frame_artist,TRUE,TRUE,0); id3win_frame_albyear=gtk_hbox_new(FALSE,30); id3win_frame_album=gtk_frame_new("Album"); gtk_container_border_width(GTK_CONTAINER(id3win_frame_album),5); id3win_text_album=gtk_entry_new_with_max_length(30); gtk_container_add(GTK_CONTAINER(id3win_frame_album),id3win_text_album); gtk_box_pack_start(GTK_BOX(id3win_frame_albyear),id3win_frame_album,TRUE,TRUE,0); id3win_frame_year=gtk_frame_new("Year"); gtk_widget_set_usize(id3win_frame_year,2,0); gtk_container_border_width(GTK_CONTAINER(id3win_frame_year),5); id3win_text_year=gtk_entry_new_with_max_length(4); gtk_container_add(GTK_CONTAINER(id3win_frame_year),id3win_text_year); gtk_box_pack_start(GTK_BOX(id3win_frame_albyear),id3win_frame_year,TRUE,TRUE,0); gtk_box_pack_start(GTK_BOX(id3win_frame_global),id3win_frame_albyear,TRUE,TRUE,0); id3win_frame_comtrack=gtk_hbox_new(FALSE,30); id3win_frame_comment=gtk_frame_new("Comment"); gtk_container_border_width(GTK_CONTAINER(id3win_frame_comment),5); id3win_text_comment=gtk_entry_new_with_max_length(30); gtk_container_add(GTK_CONTAINER(id3win_frame_comment),id3win_text_comment); gtk_box_pack_start(GTK_BOX(id3win_frame_comtrack),id3win_frame_comment,TRUE,TRUE,0); id3win_frame_track=gtk_frame_new("Track"); gtk_widget_set_usize(id3win_frame_track,2,0); gtk_container_border_width(GTK_CONTAINER(id3win_frame_track),5); id3win_text_track=gtk_entry_new_with_max_length(3); gtk_container_add(GTK_CONTAINER(id3win_frame_track),id3win_text_track); gtk_box_pack_start(GTK_BOX(id3win_frame_comtrack),id3win_frame_track,TRUE,TRUE,0); gtk_box_pack_start(GTK_BOX(id3win_frame_global),id3win_frame_comtrack,TRUE,TRUE,0); id3win_frame_genre=gtk_frame_new("Genre"); gtk_container_border_width(GTK_CONTAINER(id3win_frame_genre),5); id3win_combo_genre=gtk_combo_new(); for(i=0;i 0) sprintf(track_text,"%d",(int)mp3.id3.track[0]); else track_text[0]=0; gtk_entry_set_text(GTK_ENTRY(id3win_text_track),track_text); gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(id3win_combo_genre)->entry), gtext_genre(mp3.id3.genre[0])); } else { open_mp3_file(); } gtk_main(); return(0); } gchar *gtext_genre(unsigned char genre) { int genre_num = (int) genre; if(genre_num <= MAXGENRE) { return((gchar *)typegenre[genre_num]); } else { return((gchar *)""); } } unsigned char gget_genre (char *genre) { int num_genre=0; if(genre[0] == '\0') { return 255; } sscanf(genre,"%u",&num_genre); if(num_genre == 0) { if(genre[0] != '0') { while(num_genre++ <= MAXGENRE) { if(!strcasecmp(genre,typegenre[num_genre-1])) { return num_genre-1; } } num_genre=256; } } if(num_genre < 0 || num_genre > MAXGENRE) { num_genre=255; } return (unsigned char) num_genre; } /* rmcc was here */ void create_techinfo_win(void) { GtkWidget *infowin_main, *infowin_main_frame; GtkWidget *infowin_exit_button, *infowin_button_frame; GtkWidget *infowin_text_media, *infowin_text_bitrate; GtkWidget *infowin_text_emphasis, *infowin_text_crc; GtkWidget *infowin_text_copyright, *infowin_text_original; GtkWidget *infowin_text_padding, *infowin_text_length; GtkWidget *infowin_text_frequency; int ibuf,ibuf2; char buf[1023]; char *layer_text[] = { "I", "II", "III" }; infowin_main = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_widget_set_usize(infowin_main, 230, 300); gtk_container_border_width(GTK_CONTAINER(infowin_main), 15); gtk_window_set_title(GTK_WINDOW(infowin_main), "MP3 Technical Info"); gtk_window_set_policy(GTK_WINDOW(infowin_main), FALSE, FALSE, FALSE); gtk_signal_connect_object(GTK_OBJECT(infowin_main), "key_press_event", GTK_SIGNAL_FUNC(kill_if_esc), (gpointer) infowin_main); infowin_main_frame=gtk_vbox_new(FALSE,5); if (mp3.header_isvalid) { sprintf(buf,"Media Type: MPEG %s Layer %s",mp3.header.version ? ((mp3.header.version==2) ? "2.5" : "1.0") : "2.0", layer_text[header_layer(&mp3.header)-1]); infowin_text_media=gtk_label_new(buf); gtk_box_pack_start(GTK_BOX(infowin_main_frame),infowin_text_media,TRUE,TRUE,0); sprintf(buf,"Bitrate: %i KB/s",header_bitrate(&mp3.header)); infowin_text_bitrate=gtk_label_new(buf); gtk_box_pack_start(GTK_BOX(infowin_main_frame),infowin_text_bitrate,TRUE,TRUE,0); sprintf(buf,"Frequency: %iKHz",header_frequency(&mp3.header)/1000); infowin_text_frequency=gtk_label_new(buf); gtk_box_pack_start(GTK_BOX(infowin_main_frame),infowin_text_frequency,TRUE,TRUE,0); ibuf=mp3.seconds / 60; ibuf2=mp3.seconds % 60; sprintf(buf,"Length: %i:%02i",ibuf,ibuf2); infowin_text_length=gtk_label_new(buf); gtk_box_pack_start(GTK_BOX(infowin_main_frame),infowin_text_length,TRUE,TRUE,0); sprintf(buf,"Emphasis: %s",header_emphasis(&mp3.header)); infowin_text_emphasis=gtk_label_new(buf); gtk_box_pack_start(GTK_BOX(infowin_main_frame),infowin_text_emphasis,TRUE,TRUE,0); sprintf(buf,"CRC: %s",!mp3.header.crc ? "Yes" : "No"); infowin_text_crc=gtk_label_new(buf); gtk_box_pack_start(GTK_BOX(infowin_main_frame),infowin_text_crc,TRUE,TRUE,0); sprintf(buf,"Copyright: %s",mp3.header.copyright ? "Yes" : "No"); infowin_text_copyright=gtk_label_new(buf); gtk_box_pack_start(GTK_BOX(infowin_main_frame),infowin_text_copyright,TRUE,TRUE,0); sprintf(buf,"Original: %s",mp3.header.original ? "Yes" : "No"); infowin_text_original=gtk_label_new(buf); gtk_box_pack_start(GTK_BOX(infowin_main_frame),infowin_text_original,TRUE,TRUE,0); sprintf(buf,"Padding: %s",mp3.header.padding ? "Yes" : "No"); infowin_text_padding=gtk_label_new(buf); gtk_box_pack_start(GTK_BOX(infowin_main_frame),infowin_text_padding,TRUE,TRUE,0); } else { sprintf(buf,"This file's header\nis invalid.\n\nNo information\navailable"); infowin_text_media=gtk_label_new(buf); gtk_box_pack_start(GTK_BOX(infowin_main_frame),infowin_text_media,TRUE,TRUE,0); } infowin_button_frame=gtk_hbox_new(TRUE,30); gtk_widget_set_usize(infowin_button_frame,30,20); gtk_box_pack_start(GTK_BOX(infowin_main_frame),infowin_button_frame,TRUE,TRUE,0); infowin_exit_button = gtk_button_new_with_label("Exit"); gtk_widget_show(infowin_exit_button); gtk_box_pack_end(GTK_BOX(infowin_button_frame), infowin_exit_button, FALSE, TRUE, 0); gtk_signal_connect_object(GTK_OBJECT(infowin_exit_button), "pressed", GTK_SIGNAL_FUNC(gtk_widget_destroy), GTK_OBJECT(infowin_main)); gtk_container_add(GTK_CONTAINER(infowin_main),infowin_main_frame); gtk_widget_show_all(infowin_main); } void open_mp3_file(void) { GtkWidget *filewin_main; filewin_main=gtk_file_selection_new("Use another MP3 File"); gtk_signal_connect_object(GTK_OBJECT(filewin_main), "key_press_event", (GtkSignalFunc) kill_if_esc, (gpointer) filewin_main); gtk_signal_connect_object(GTK_OBJECT(GTK_FILE_SELECTION(filewin_main)->cancel_button), "pressed", GTK_SIGNAL_FUNC(gtk_widget_destroy), GTK_OBJECT(filewin_main)); gtk_signal_connect(GTK_OBJECT(GTK_FILE_SELECTION(filewin_main)->ok_button), "clicked", (GtkSignalFunc) read_new_mp3, filewin_main); gtk_widget_show(filewin_main); } void read_new_mp3(GtkWidget *button, GtkWidget *file) { char *filename; filename = (char *)gtk_file_selection_get_filename(GTK_FILE_SELECTION(file)); if (load_mp3(filename) == 1) { gtk_widget_destroy(file); gtk_entry_set_text(GTK_ENTRY(id3win_text_title),mp3.id3.title); gtk_entry_set_text(GTK_ENTRY(id3win_text_artist),mp3.id3.artist); gtk_entry_set_text(GTK_ENTRY(id3win_text_album),mp3.id3.album); gtk_entry_set_text(GTK_ENTRY(id3win_text_year),mp3.id3.year); gtk_entry_set_text(GTK_ENTRY(id3win_text_comment),mp3.id3.comment); gtk_entry_set_text(GTK_ENTRY(id3win_text_track),(char *)mp3.id3.track); gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(id3win_combo_genre)->entry), gtext_genre(mp3.id3.genre[0])); } } int load_mp3(char *filename) { mp3info nmp3; memset(&nmp3,0,sizeof(mp3info)); if ( !( nmp3.file=fopen(filename,"rb+") ) ) { if((nmp3.file=fopen(filename,"rb"))) read_only=1; else { if (id3win) { quick_popup("Error in file", "Error opening MP3 file."); } else { g_print("Error opening MP3 file."); } return 0; } } nmp3.filename=filename; get_mp3_info(&nmp3,SCAN_QUICK,0); if(!nmp3.header_isvalid && !nmp3.id3_isvalid) { if (id3win) { quick_popup("Error in file", "File is corrupt or is not a standard MP3 file!"); } else { g_print("File is corrupt or is not a standard MP3 file!\n"); } return 0; } else { mp3=nmp3; return 1; } return 0; } int kill_if_esc(GtkWidget *widget, GdkEventKey *event, gpointer obj) { if(event && event->type == GDK_KEY_PRESS && event->keyval == GDK_Escape) { gtk_widget_destroy(GTK_WIDGET(obj)); gtk_signal_emit_stop_by_name(GTK_OBJECT(widget), "key_press_event"); } return(TRUE); } void quick_popup(char *title, char *message) { GtkWidget *popupwin, *popupwin_main, *popupwin_msg, *popupwin_ok; char *markup; popupwin = gtk_dialog_new(); gtk_widget_realize(popupwin); gtk_container_border_width(GTK_CONTAINER(popupwin), 12); gtk_window_set_title(GTK_WINDOW(popupwin), title); popupwin_main = GTK_DIALOG(popupwin)->vbox; popupwin_msg=gtk_label_new(NULL); markup = g_markup_printf_escaped("%s",message); gtk_label_set_markup(GTK_LABEL(popupwin_msg),markup); g_free (markup); gtk_box_pack_start(GTK_BOX(popupwin_main),popupwin_msg,TRUE,TRUE,0); popupwin_ok = gtk_button_new_with_label(" OK "); gtk_signal_connect_object(GTK_OBJECT(popupwin_ok), "clicked", GTK_SIGNAL_FUNC(gtk_widget_destroy), GTK_OBJECT(popupwin)); gtk_signal_connect_object(GTK_OBJECT(popupwin), "key_press_event", (GtkSignalFunc) kill_if_esc, (gpointer) popupwin); gtk_box_pack_end(GTK_BOX(popupwin_main), popupwin_ok, TRUE, FALSE, 0); gtk_widget_show_all(popupwin); } void about_mp3info(void) { quick_popup(VERSION,"MP3Info\n" " An ID3 Tag Editor\n\n\n" " Original author: Ricardo Cerqueira \n" " Current maintainer: Cedric Tefft \n" " (C) 1999-2006 Ricardo Cerqueira, Cedric Tefft\n\n"); } /* rmcc has left the building */ mp3info_0.8.5a.orig/mp3curs.c0000644000000000000000000001030610763631155016172 0ustar00usergroup00000000000000/* mp3curs.c - curses/ncurses interface for mp3info Copyright (C) 2000-2006 Cedric Tefft This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You 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. *************************************************************************** This program is based in part on MP3Info 0.5 by Ricardo Cerqueira */ #include "mp3info.h" /* * Check if Break is given, and if so, clean term and exit, else pad the input. */ char *checkinput(int c, char *string, int length) { if (c == CTRL_C) { endwin(); exit(0); } return string; } /* * Get the cursor to the right place, and get input */ char *curs_addparam(WINDOW *win, int line, int length, char *buf) { int c; char string[TEXT_FIELD_LEN]; wmove(win,line,16); c = wgetnstr(win,string,length); strcpy(buf,checkinput(c,string,length)); return buf; } /* * Bring up the curses window, then get and parse input, and build the tag. */ void tagedit_curs(char *filename, int filenum, int fileoutof, id3tag *tag) { WINDOW *mainwin; char line[50], track_text[4], *genre, genre_text[30]; unsigned int track_num, genre_num; line[0]='\0'; initscr(); cbreak(); noecho(); nonl(); mainwin = newwin(9,COLS,5,0); intrflush(mainwin, FALSE); keypad(mainwin, TRUE); CenterText(1,VERSION); /* CenterText(2,"by Ricardo Cerqueira (C)2000"); */ #ifdef HAVE_TOUCHWIN touchwin(mainwin); #endif box(mainwin, 0, 0); wmove(mainwin,1,1); wprintw(mainwin,"Song Title: %s",tag->title); wmove(mainwin,2,1); wprintw(mainwin,"Artist Name: %s",tag->artist); wmove(mainwin,3,1); wprintw(mainwin,"Album Name: %s",tag->album); wmove(mainwin,4,1); wprintw(mainwin,"Year: %s",tag->year); wmove(mainwin,5,1); wprintw(mainwin,"Comment: %s",tag->comment); wmove(mainwin,6,1); if(tag->track[0] != '\0') { sprintf(track_text,"%d",tag->track[0]); } else { track_text[0]='\0'; } wprintw(mainwin,"Track: %s",track_text); wmove(mainwin,7,1); if(tag->genre[0] < 127) { genre=typegenre[tag->genre[0]]; } else { genre=""; } strcpy(genre_text,genre); wprintw(mainwin,"Genre: %s",genre); wmove(mainwin,8,4); wprintw(mainwin," (%d/%d) %s ",filenum,fileoutof,filename); #ifdef __WIN32__ wmove(mainwin,8,COLS-23); wprintw(mainwin," Press ^BREAK to quit "); #else wmove(mainwin,8,COLS-22); wprintw(mainwin," Press ^C to quit "); #endif refresh(); echo(); curs_addparam(mainwin,1,30,line); strncpy(tag->title,line,strlen(line)); curs_addparam(mainwin,2,30,line); strncpy(tag->artist,line,strlen(line)); curs_addparam(mainwin,3,30,line); strncpy(tag->album,line,strlen(line)); curs_addparam(mainwin,4,4,line); strncpy(tag->year,line,strlen(line)); curs_addparam(mainwin,5,30,line); strncpy(tag->comment,line,strlen(line)); curs_addparam(mainwin,6,30,line); strncpy(track_text,line,strlen(line) + (strlen(line) < strlen (track_text) ? 0 : 1)); /* strncpy(track_text,line,3); */ curs_addparam(mainwin,7,30,line); strncpy(genre_text,line,strlen(line) + (strlen(line) < strlen (genre_text) ? 0 : 1)); endwin(); if((track_num=atoi(track_text)) < 256) { tag->track[0] = (unsigned char) track_num; } else { printf("ERROR - '%s' is not a valid track number.\n",track_text); } unpad(genre_text); if((genre_num=get_genre(genre_text)) < 256) { tag->genre[0] = (unsigned char) genre_num; } else { printf("ERROR - '%s' is not a valid genre name or number.\nUse '-G' for a list of valid genres.\n",genre_text); } } mp3info_0.8.5a.orig/mp3info.10000644000000000000000000003421010763631155016067 0ustar00usergroup00000000000000.TH mp3info 1 "November 6, 2006" "mp3info" .SH NAME mp3info \- MP3 technical info viewer and ID3 tag editor .SH SYNOPSIS .B mp3info \fP[\fB -h \fP|\fB -G \fP]\fB .PP .B mp3info \fP[\fB-x\fP] [\fB-F\fP] [\fB-r a\fP|\fBm\fP|\fBv\fP] [\fB-p\fP \fIFORMAT_STRING\fP] \fIfile...\fR .PP .B mp3info \fP[\fB-d\fP]\fB \fIfile...\fP .PP .B mp3info \fP[\fB-i\fP] [\fB-t \fItitle\fP] [\fB-a \fIartist\fP] [\fB-l \fIalbum\fP] [\fB-y \fIyear\fP] [\fB-c \fIcomment\fP] [\fB-n \fItrack\fP] [\fB-g \fIgenre\fP] \fIfile...\fP .br .SH DESCRIPTION .B mp3info is a utility used to read and modify the ID3 tags in MPEG layer 3 (MP3) files. It can also (optionally) display various technical attributes of the MP3 file. .SH OPTIONS .B .IP "-a \fIartist\fP" Specify ID3 artist name .B .IP "-c \fIcomment\fP" Specify ID3 comment .B .IP "-g \fIgenre\fP" Specify ID3 genre (use \fB-G\fP option for a list of valid genres). You may specify either a genre name or a number. .B .IP "-l \fIalbum\fP" Specify ID3 album name .B .IP "-n \fItrack\fP" Specify ID3 v1.1 track number .B .IP "-t \fItitle\fP" Specify ID3 track title .B .IP "-y \fIyear\fP" Specify ID3 copyright year .B .IP -G Display a list of valid genres and their associated numeric codes. These are the only values accepted by the \fB-g\fP switch. .B .IP -h Display a help page .B .IP -x Display technical attributes of the MP3 file .B .IP "-r a\fP|\fBm\fP|\fBv" Report bit rate of Variable Bit Rate (VBR) files as one of the following (See the section below entitled \fBBit Rates\fP for more information): .PP .RS 7 .PD 0 .HP .B a \- Average bit rate [float](Note: this option also causes the bit rates of non-VBR files to be displayed as floating point values). .LP .HP .B m \- Median bit rate [integer] .LP .HP .B v \- Simply use the word 'Variable' [string] (this is the default). .PD .RE .B .IP -i Edit ID3 tag interactively (uses curses/ncurses functions) .B .IP -d Delete ID3 tag (if one exists) .B .IP -f Force Mode: Treat all files as MP3s even if MP3 frames can't be found .B .IP -F Do a Full scan for technical information (see the section \fBSpeed Considerations\fP below for more information) .PP .B -p "\fIFORMAT_STRING\fP" .IP Print MP3 attributes according to \fIFORMAT_STRING\fP. \fIFORMAT_STRING\fP is similar to a \fBprintf(3)\fP format string in that it is printed verbatim except for the following conversions and escape sequences. Any conversion specifier may optionally include the various alignment, precision, and field width modifiers accepted by \fBprintf(3)\fP. See the \fBEXAMPLES\fP section below for examples of how format strings are used in mp3info. .PP .IP .B Conversion Specifiers .PP .RS 10 .PD 0 .B .IP %f Filename without the path [string] .B .IP %F Filename with the path [string] .B .IP %k File size in KB [integer] .B .IP %a Artist [string] .B .IP %c Comment [string] .B .IP %g Musical genre [string] .B .IP %G Musical genre number [integer] .B .IP %l Album name [string] .B .IP %n Track [integer] .B .IP %t Track Title [string] .B .IP %y Year [string] .B .IP %C Copyright flag [string] .B .IP %e Emphasis [string] .B .IP %E CRC Error protection [string] .B .IP %L MPEG Layer [string] .B .IP %O Original material flag [string] .B .IP %o Stereo/mono mode [string] .B .IP %p Padding [string] .B .IP %v MPEG Version [float] .B .IP %u Number of good audio frames [integer] .B .IP %b Number of corrupt audio frames [integer] .B .IP %Q Sampling frequency in Hz [integer] .B .IP %q Sampling frequency in KHz [integer] .B .IP %r Bit Rate in KB/s (type and meaning affected by \fB-r\fP option) .B .IP %m Playing time: minutes only [integer] .B .IP %s Playing time: seconds only [integer] (usually used in conjunction with \fB%m\fP) .B .IP %S Total playing time in seconds [integer] .B .IP %% A single percent sign .RE .PD .PP .RS 7 .B "Escape Sequences" .RE .PP .PD 0 .RS 10 .B .IP \en Newline .B .IP \et Horizontal tab .B .IP \ev Vertical tab .B .IP \eb Backspace .B .IP \er Carriage Return .B .IP \ef Form Feed .B .IP \ea Audible Alert (terminal bell) .B .IP \ex\fIhh\fB Any arbitrary character specified by the hexidecimal number \fIhh\fP .B .IP \e\fIooo\fB Any arbitrary character specified by the octal number \fIooo\fP .B .IP \fB\e\e\fP A single backslash character .RE .PP .PD .SH USAGE Specifying MP3 files without any other options displays the existing ID3 tag (if any). .PP Specifying a track number of 0 reverts an ID3 tag to 1.0 format .PP Non-specified ID3 fields, if existant, will remain unchanged. .PP Genres can be specified as numbers or names: \fB-g 17\fP same as \fB-g Rock\fP .PP Multiple word fields must be enclosed in quotes (eg: \fB-t "A title"\fP) .SH NOTES .IP "\fBSpeed Considerations\fP" In order to determine certain technical attributes (playing time, number of frames, number of bad frames, and in a few cases the bit rate) with absolute certainty, it would be necessary to read the entire MP3 file. Mp3info normally tries to speed things up by reading a handful of frames from various points in the file and estimating the statistics for the rest of the file based on those samples. Usually, this results in very accurate estimates. Audio playing times are usually off by no more than a second, and the number of frames is off by less than 0.1%. Often the estimates agree exactly with the full scans. Nevertheless, the user may wish to ensure that she is getting exact information. .IP One should specify the \fB-F\fP switch if one wants mp3info to read the entire MP3 file when determining this information. Note that a full scan will only affect mp3info's output if the \fB-x\fP switch is used or the \fB-p\fP switch is used with a FORMAT_SPECIFIER containing \fB%m\fP, \fB%s\fP, \fB%S\fP, \fB%u\fP or (rarely) \fB%r\fP. Using the \fB-F\fP switch under other conditions will only slow down mp3info. Also note that a FORMAT_SPECIFIER containing \fB%b\fP or a VBR MP3 file will automatically trigger a full scan even if the \fB-F\fP switch is not used. .IP Several users have noted that the \fB%u\fP specifier used alone: .PP .IP .B mp3info -p "%u" song.mp3 .IP sometimes gives a different number of good frames than when used with the \fB%b\fP specifier: .IP .B mp3info -p "%u %b" song.mp3 .IP This is because when you use \fB%u\fP by itself, mp3info only estimates the number of frames based on the bitrate and the size of the file. When you use the \fB%b\fP specifier, you force mp3info to do a full scan of the file which guarantees an accurate count of both the good and bad frames. If you want to guarantee an accurate count of the number of good frames when using \fB%u\fP by itself, you should use the \fB-F\fP option. .IP "\fBBit Rates\fP" MP3 files are made up of many (usally several thousand) audio blocks called 'frames'. Each of these frames is encoded at a specific 'bit rate' which determines both the quality of the sound and the size of the frame itself. Bit rates can range from 8 Kb/s (kilobits per second) to 320 Kb/s. Note that the MP3 specification only allows 14 discreet bit rates for an MP3 file, so, for instance, a stereo MP3 could have frames with bit rates of 128 Kb/s and 160 Kb/s, but nowhere in between. .IP Audio frames with high bit rates sound much better than those with lower bit rates, but take up more space. Obviously, one would like to use a bit rate that is only high enough to maintain a comfortable level of audio quality. Normally, all the frames in an MP3 file are encoded at the same bit rate. A few MP3 files, however, are encoded such that the bit rate may vary from one frame to the next. These MP3 files are called Variable Bit Rate (or VBR) files. Since VBR files do not have one single bit rate, attempting to report the bit rate of the file as a whole can be problematic. Consequently, mp3info allows you to specify how you want this value reported. .IP The default is to simply print the word 'Variable' where the bit rate would normally appear. Another option is to print the mathematical average of all the frames. This has the advantage of being completely accurate, but the number printed may not correspond to one of the 14 discreet bit rates that would be allowed for that file. The third alternative solves that problem by allowing the bit rate to be reported as the median bit rate which is what you would get if you lined up all the frames in the file by bit rate from lowest to highest and picked the frame closest to the middle of the line. .IP For more specific usage information, see the \fB-r\fP switch and the \fB%r\fP conversion specifier under the description of \fB-p\fP's FORMAT_SPECIFIER. .SH EXAMPLES Display existing ID3 tag information (if any) in song.mp3 .PP .IP .B mp3info song.mp3 .PP Set the title, author and genre of song.mp3. (All other fields unchanged) .IP .B mp3info -t "Song Title" -a Author -g "Rock & Roll" song.mp3 .PP Set the album field of all MP3 files in the current directory to "The White Album" .PP .IP .B mp3info -l "The White Album" *.mp3 .PP Delete the entire ID3 tag from song1.mp3 and song2.mp3 .IP .B mp3info -d song1.mp3 song2.mp3 .PP Delete the comment field from the ID3 tags of all MP3 files in the current directory. (All other fields unchanged) .IP .B mp3info -c "" *.mp3 .PP Display the Title, Artist, Album, and Year of all MP3 files in the current directory. We include the labels 'File', etc. and insert newlines (\fB\en\fP) to make things more readable for humans: .IP .B mp3info -p "File: %f\enTitle: %t\enArtist: %a\enAlbum: %l\enYear: %y\en\en" *.mp3 .PP Say you want to build a spreadsheet of your MP3 files. Here's a command you might use to help you accomplish that. Most spreadsheet programs will import an ASCII file and treat a given character as a field separator. A commonly used field separator is the tab character. For each MP3 file in the current directory, we want to output the filename, title, artist, and album on a single line and have the fields separated by a tab (\fB\et\fP) character. Note that you must include a newline (\fB\en\fP) at the end of the format string in order to get each file's information on a separate line. Here's the command: .IP .B mp3info -p "%f\et%t\et%a\et%l\et%y\en" *.mp3 .PP Some spreadsheets or other software may allow importing data from flat files where each field is a specific width. Here's where the format modifers come into play. This next command outputs the same information as the command above, but uses fixed-width fields instead of tab separators. The filename field is defined as 50 characters wide, the title field is defined as 31 characters wide, and so on. .IP .B mp3info -p "%50f%31t%31a%31l%4y\en" *.mp3 .PP The problem with the output of this command is that all strings are normally right- justified within their fields. This looks a little odd since most western languages read from left to right. In order to make the fields left-justified, add a minus sign (\fB-\fP) in front of the field-width: .IP .B mp3info -p "%-50f%-31t%-31a%-31l%-4y\en" *.mp3 .PP Now suppose you just want the running time of each MP3 file specified in minutes and seconds. Simple enough: .IP .B mp3info -p "%f: %m:%s\en" *.mp3 .PP You may notice when you do this, however, that leading zeros are not displayed in the seconds field (\fB%s\fP). So for instance, if you had a track four minutes and two seconds long its running time would be displayed as '4:2' instead of '4:02'. In order to tell mp3info to pad an integer field with zeros, you need to use a field width modifier and place a zero in front of it. The following command is the same as the previous one, but it specifies that mp3info is to display the seconds field with a fixed field-width of two characters and to pad the field with leading zeros if necessary: .IP .B mp3info -p "%f: %m:%02s\en" *.mp3 .PP The last trick we have to show you is the precision specifier for floating point variables. The following command displays the filename and average bit rate for all MP3 files in the current directory. .IP .B mp3info -r a -p "%f %r\en" *.mp3 .PP By default, the floating point value of the average bit rate is displayed with six digits past the decimal point (ex: 175.654332). If you are like me, this seems like a bit of overkill. At most you want one or two digits beyond the decimal place displayed. Or you might not want any. The following command displays the average bit rate with first two, then zero digits beyond the decimal point: .IP .B mp3info -r a -p "%f %.2r %.0r\en" *.mp3 .PP If you wanted to specify a field width for a floating point value, you could do that by placing the field-width before the decimal point in the field modifier. This command does just that -- specifying an average bit-rate field six characters wide that will show two digits of precision beyond the decimal point: .IP .B mp3info -r a -p "%f %6.2r\en" *.mp3 .SH BUGS There's no "save and quit" in interactive mode. You must fill in all the fields (even if it is with blanks) and let the program finish by itself. CTRL+C does leave MP3info, but the data isn't saved. .PP Using space to erase tags in interactive mode does not work correctly if you then backspace over the deleted text. .PP The title, author, album, and comment fields are limited to 30 characters. This is a limitation of the ID3 1.0 tag format, not MP3Info. If you specify the track number (with the \fB-n\fP switch), the ID3 1.0 tag becomes a 1.1 tag and the comment field is limited to 28 characters. This is because the difference between ID3 1.0 and 1.1 is that the tag number is stored in the last byte of the comment field. This trick "borrows" two bytes from the fixed-length comment field effectively reducing the maximum comment by two characters. .PP Genres cannot be specified arbitrarily. They must be specified from a pre-determined list (use \fBmp3info -G\fP to see that list). Again, this is a limitation of the ID3 1.0 tag format. .PP Only ID3 versions 1.0 and 1.1 are supported. ID3V2 is a much more powerful standard and is planned for some as-yet-undetermined future version. Unfortunately, a clean implementation is a heck of a lot of work and I'm unbelievably lazy, so don't hold your breath. It is probably worth noting at this juncture, however, that I do accept patches. :-) .PP Exit codes are somewhat haphazard and not well documented. .SH AUTHOR Cedric Tefft .SH "SEE ALSO" \fBprintf\fP(3)\fB mp3info_0.8.5a.orig/mp3info.c0000644000000000000000000002017710763631155016160 0ustar00usergroup00000000000000/* MP3Info - Displays and allows editing of MP3 ID3 tags and various technical aspects of MP3 files. mp3info.c - main part of console version of MP3Info Copyright (C) 2000-2006 Cedric Tefft This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You 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. *************************************************************************** This program is based in part on MP3Info 0.5 by Ricardo Cerqueira */ #define __MAIN #include "mp3info.h" #undef __MAIN #include char FILENAME_FORMAT_STRING[]="File: %F\n"; char ID3_FORMAT_STRING[]="Title: %-30t Track: %n\nArtist: %a\nAlbum: %-30l Year: %y\nComment: %-30c Genre: %g [%G]\n"; char TECH_FORMAT_STRING[]="Media Type: MPEG %2.1v Layer %L\nAudio: %r KB/s, %qKHz (%o)\nEmphasis: %e\nCRC: %E\nCopyright: %C\nOriginal: %O\nPadding: %p\nLength: %m:%02s\n"; int main(int argc, char *argv[]) { FILE *fp; int c, i, interactive = 0, view_only=1,delete_tag=0,file_open,retcode=0; int want_id3=1,scantype=SCAN_NONE,fullscan_vbr=0; int show_techinfo=0,force_mode=0,quickscan=1; int new_track=0,new_genre=0,firstfilearg; id3tag new_tag; char *print_format=NULL; char error_msg[256]; unsigned int g,n; int vbr_report=VBR_VARIABLE; mp3info mp3; new_tag.title[0]=new_tag.artist[0]=new_tag.album[0]=new_tag.year[0]= new_tag.comment[0]=new_tag.track[0]=new_tag.genre[0]=1; /* use something REALLY unlikely... -- so we could clear the tag... */ if (argc < 2 ) /* Only command is given. Short help */ { printf("%s %s\n"\ "\n MP3Info comes with ABSOLUTELY NO WARRANTY. This is free software, and\n"\ " you are welcome to redistribute it under certain conditions.\n"\ " See the file 'LICENSE' for more information.\n"\ "\nUse 'mp3info -h' for a usage summary or see the mp3info man page for a\n"\ "complete description.\n",VERSION,COPYRIGHT); return 0; } while ((c=getopt(argc,argv,"vhGidfxFt:a:l:y:c:n:g:p:r:"))!=-1) { switch(c) { case 'v': /* View mode is now automatic when no changes are made to the ID3 tag. This switch is accepted only for backward compatibility */ break; case 'h': display_help(); return 0; break; case 'G': display_genres(alphagenreindex,typegenre); return 0; break; case 'i': view_only=0; interactive = 1; break; case 'd': view_only=0; delete_tag=1; break; case 'p': print_format=optarg; translate_escapes(print_format); want_id3=0; break; case 'f': force_mode=1; break; case 'x': show_techinfo=1; break; case 't': strncpy(new_tag.title,optarg,TEXT_FIELD_LEN); view_only=0; break; case 'a': strncpy(new_tag.artist,optarg,TEXT_FIELD_LEN); view_only=0; break; case 'l': strncpy(new_tag.album,optarg,TEXT_FIELD_LEN); view_only=0; break; case 'y': strncpy(new_tag.year,optarg,INT_FIELD_LEN); view_only=0; break; case 'c': strncpy(new_tag.comment,optarg,TEXT_FIELD_LEN); view_only=0; break; case 'n': n=atoi(optarg); if(n <= 255) { new_tag.track[0] = (unsigned char) n; new_track=1; view_only=0; } else { fprintf(stderr,"Error: '%s' is not a valid track number.\n",optarg); fprintf(stderr,"Valid track numbers are integers from 0 to 255.\n"); fprintf(stderr,"Use a value of '0' to remove the track number field\n"); retcode |= 6; return retcode; } break; case 'g': g=get_genre(optarg); if(g <= 255) { new_tag.genre[0] = (unsigned char) g; new_genre=1; view_only=0; } else { fprintf(stderr,"Error: '%s' is not a recognized genre name or number.\n",optarg); fprintf(stderr,"Use the '-G' option to see a list of valid genre names and numbers\n"); retcode |= 6; return retcode; } sscanf(optarg,"%u",&g); break; case 'r': switch(optarg[0]) { case 'a': vbr_report=VBR_AVERAGE; break; case 'm': vbr_report=VBR_MEDIAN; break; case 'v': vbr_report=VBR_VARIABLE; break; default: fprintf(stderr,"Error: %s is not a valid option to the VBR reporting switch (-r)\n",optarg); fprintf(stderr,"Valid options are 'a', 'm' and 'v'. Run '%s -h' for more info.\n",argv[0]); retcode |= 6; return retcode; } break; case 'F': quickscan=0; break; } } if(!view_only) scantype=SCAN_QUICK; if(print_format) { determine_tasks(print_format,&want_id3,&scantype,&fullscan_vbr,vbr_report); } else if(view_only) { determine_tasks(ID3_FORMAT_STRING,&want_id3,&scantype,&fullscan_vbr,vbr_report); if(show_techinfo) determine_tasks(TECH_FORMAT_STRING,&want_id3,&scantype,&fullscan_vbr,vbr_report); } if(!quickscan && (scantype == SCAN_QUICK)) scantype=SCAN_FULL; firstfilearg=optind; for(i=optind;i < argc; i++) { /* Iterate over all filenames */ file_open=0; if (view_only == 1) { if ( !( fp=fopen(argv[i],"rb") ) ) { sprintf(error_msg,"Error opening MP3: %s",argv[i]); perror(error_msg); retcode |= 1; } else { file_open=1; } } else { if ( !( fp=fopen(argv[i],"rb+") ) ) { sprintf(error_msg,"Error opening MP3: %s",argv[i]); perror(error_msg); retcode |= 1; } else { file_open=1; } } if(file_open == 1) { memset(&mp3,0,sizeof(mp3info)); mp3.filename=argv[i]; mp3.file=fp; get_mp3_info(&mp3,scantype,fullscan_vbr); if((scantype != SCAN_NONE) && !mp3.header_isvalid && !force_mode) { fprintf(stderr,"%s is corrupt or is not a standard MP3 file.\n",mp3.filename); retcode |= 2; } if(view_only) { if(want_id3 && !mp3.id3_isvalid) fprintf(stderr,"%s does not have an ID3 1.x tag.\n",mp3.filename); if(print_format) { format_output(print_format,&mp3,vbr_report); } else { if(mp3.id3_isvalid || (show_techinfo && mp3.header_isvalid)) format_output(FILENAME_FORMAT_STRING,&mp3,vbr_report); if(mp3.id3_isvalid) format_output(ID3_FORMAT_STRING,&mp3,vbr_report); if(show_techinfo && mp3.header_isvalid) format_output(TECH_FORMAT_STRING,&mp3,vbr_report); printf("\n"); } } else if(mp3.header_isvalid || force_mode) { if(new_tag.title[0]!=1) { strncpy(mp3.id3.title,new_tag.title,TEXT_FIELD_LEN); } if(new_tag.artist[0]!=1) { strncpy(mp3.id3.artist,new_tag.artist,TEXT_FIELD_LEN); } if(new_tag.album[0]!=1) { strncpy(mp3.id3.album,new_tag.album,TEXT_FIELD_LEN); } if(new_tag.comment[0]!=1) { strncpy(mp3.id3.comment,new_tag.comment,TEXT_FIELD_LEN); } if(new_track) { mp3.id3.track[0]=new_tag.track[0]; if(new_tag.track[0] == '\0') { pad(mp3.id3.comment,TEXT_FIELD_LEN); } } if(new_tag.year[0]!=1) { strncpy(mp3.id3.year,new_tag.year,INT_FIELD_LEN); } if(new_genre) { mp3.id3.genre[0]=new_tag.genre[0]; } if( interactive ) { tagedit_curs(mp3.filename,i-firstfilearg+1,argc-firstfilearg,&(mp3.id3)); } /* Finally! Get it done! */ if(!delete_tag) { write_tag(&mp3); } } else { fprintf(stderr,"Use the -f switch to add ID3 info to this file anyway.\n"); } fclose(mp3.file); if(delete_tag && mp3.id3_isvalid) { truncate(mp3.filename,mp3.datasize); } } } if(optind == argc) { fprintf(stderr,"No MP3 files specified!\n"); retcode |= 8; } return retcode; } mp3info_0.8.5a.orig/mp3info.h0000644000000000000000000001023010763631155016152 0ustar00usergroup00000000000000/* mp3info.h - Header files for MP3Info Copyright (C) 2000-2006 Cedric Tefft This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You 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. *************************************************************************** This program is based in part on MP3Info 0.5 by Ricardo Cerqueira */ #include #include #include #include #include #include #ifdef __WIN32__ #include "win32/curses.h" #define uint unsigned int #include #ifdef __MINGW32__ int truncate(const char *name, off_t length); #endif #else #include #endif #include #include "mp3tech.h" #include "textfunc.h" #define VERSION "MP3Info 0.8.5a" #define COPYRIGHT "Copyright (C) 2006 Cedric Tefft and Ricardo Cerqueira" #define MAXGENRE 147 #define GENREROWS 50 #ifdef __MAIN char *typegenre [MAXGENRE+2] = { "Blues","Classic Rock","Country","Dance","Disco","Funk","Grunge", "Hip-Hop","Jazz","Metal","New Age","Oldies","Other","Pop","R&B", "Rap","Reggae","Rock","Techno","Industrial","Alternative","Ska", "Death Metal","Pranks","Soundtrack","Euro-Techno","Ambient", "Trip-Hop","Vocal","Jazz+Funk","Fusion","Trance","Classical", "Instrumental","Acid","House","Game","Sound Clip","Gospel","Noise", "Alt. Rock","Bass","Soul","Punk","Space","Meditative", "Instrumental Pop","Instrumental Rock","Ethnic","Gothic", "Darkwave","Techno-Industrial","Electronic","Pop-Folk","Eurodance", "Dream","Southern Rock","Comedy","Cult","Gangsta Rap","Top 40", "Christian Rap","Pop/Funk","Jungle","Native American","Cabaret", "New Wave","Psychedelic","Rave","Showtunes","Trailer","Lo-Fi", "Tribal","Acid Punk","Acid Jazz","Polka","Retro","Musical", "Rock & Roll","Hard Rock","Folk","Folk/Rock","National Folk", "Swing","Fast-Fusion","Bebob","Latin","Revival","Celtic", "Bluegrass","Avantgarde","Gothic Rock","Progressive Rock", "Psychedelic Rock","Symphonic Rock","Slow Rock","Big Band", "Chorus","Easy Listening","Acoustic","Humour","Speech","Chanson", "Opera","Chamber Music","Sonata","Symphony","Booty Bass","Primus", "Porn Groove","Satire","Slow Jam","Club","Tango","Samba", "Folklore","Ballad","Power Ballad","Rhythmic Soul","Freestyle", "Duet","Punk Rock","Drum Solo","A Cappella","Euro-House", "Dance Hall","Goa","Drum & Bass","Club-House","Hardcore","Terror", "Indie","BritPop","Negerpunk","Polsk Punk","Beat", "Christian Gangsta Rap","Heavy Metal","Black Metal","Crossover", "Contemporary Christian","Christian Rock","Merengue","Salsa", "Thrash Metal","Anime","JPop","Synthpop","" }; int galphagenreindex[MAXGENRE+2] = { 148,123,74,73,34,99,40,20,26,145,90, 116,41,135,85,96,138,89,0,107,132,65,88, 104,102,97,136,61,141,1,32,128,112,57,140, 2,139,58,125,3,50,22,4,55,127,122,120, 98,52,48,124,25,54,84,81,115,80,119,5, 30,36,59,126,38,91,49,6,79,129,137,7, 35,100,131,19,46,47,33,146,29,8,63,86, 71,45,142,9,77,82,64,133,10,66,39,11, 103,12,75,134,53,62,13,109,117,23,108,92, 93,67,121,43,14,15,68,16,76,87,118,78, 17,143,114,110,69,21,111,95,105,42,37,24, 56,44,101,83,94,106,147,113,51,18,130,144, 60,70,31,72,27,28 }; int *alphagenreindex=&(galphagenreindex[1]); #ifdef __WIN32__ extern int opterr,optind,optopt,optreset; extern char *optarg; #endif #else extern char *typegenre [MAXGENRE+2]; extern int alphagenreindex [MAXGENRE+1]; extern int galphagenreindex [MAXGENRE+2]; #endif void tagedit_curs(char *filename, int filenum, int fileoutof, id3tag *tag); mp3info_0.8.5a.orig/mp3info.html0000644000000000000000000004155010763631155016700 0ustar00usergroup00000000000000Manpage of mp3info

mp3info

Section: User Commands (1)
Updated: November 6, 2006
Index

 

NAME

mp3info - MP3 technical info viewer and ID3 tag editor

 

SYNOPSIS

mp3info [ -h | -G ]

mp3info [-x] [-F] [-r a|m|v] [-p FORMAT_STRING] file...

mp3info [-d] file...

mp3info [-i] [-t title] [-a artist] [-l album] [-y year] [-c comment] [-n track] [-g genre] file...

 

DESCRIPTION

mp3info is a utility used to read and modify the ID3 tags in MPEG layer 3 (MP3) files. It can also (optionally) display various technical attributes of the MP3 file.

 

OPTIONS

-a artist
Specify ID3 artist name
-c comment
Specify ID3 comment
-g genre
Specify ID3 genre (use -G option for a list of valid genres). You may specify either a genre name or a number.
-l album
Specify ID3 album name
-n track
Specify ID3 v1.1 track number
-t title
Specify ID3 track title
-y year
Specify ID3 copyright year
-G
Display a list of valid genres and their associated numeric codes. These are the only values accepted by the -g switch.
-h
Display a help page
-x
Display technical attributes of the MP3 file
-r a|m|v
Report bit rate of Variable Bit Rate (VBR) files as one of the following (See the section below entitled Bit Rates for more information):

a - Average bit rate [float](Note: this option also causes the bit rates of
non-VBR files to be displayed as floating point values).

m - Median bit rate [integer]

v - Simply use the word 'Variable' [string] (this is the default).
-i
Edit ID3 tag interactively (uses curses/ncurses functions)
-d
Delete ID3 tag (if one exists)
-f
Force Mode: Treat all files as MP3s even if MP3 frames can't be found
-F
Do a Full scan for technical information (see the section Speed Considerations below for more information)

-p "FORMAT_STRING"

Print MP3 attributes according to FORMAT_STRING. FORMAT_STRING is similar to a printf(3) format string in that it is printed verbatim except for the following conversions and escape sequences. Any conversion specifier may optionally include the various alignment, precision, and field width modifiers accepted by printf(3). See the EXAMPLES section below for examples of how format strings are used in mp3info.

Conversion Specifiers

%f
Filename without the path [string]
%F
Filename with the path [string]
%k
File size in KB [integer]
%a
Artist [string]
%c
Comment [string]
%g
Musical genre [string]
%G
Musical genre number [integer]
%l
Album name [string]
%n
Track [integer]
%t
Track Title [string]
%y
Year [string]
%C
Copyright flag [string]
%e
Emphasis [string]
%E
CRC Error protection [string]
%L
MPEG Layer [string]
%O
Original material flag [string]
%o
Stereo/mono mode [string]
%p
Padding [string]
%v
MPEG Version [float]
%u
Number of good audio frames [integer]
%b
Number of corrupt audio frames [integer]
%Q
Sampling frequency in Hz [integer]
%q
Sampling frequency in KHz [integer]
%r
Bit Rate in KB/s (type and meaning affected by -r option)
%m
Playing time: minutes only [integer]
%s
Playing time: seconds only [integer] (usually used in conjunction with %m)
%S
Total playing time in seconds [integer]
%%
A single percent sign

Escape Sequences

\n
Newline
\t
Horizontal tab
\v
Vertical tab
\b
Backspace
\r
Carriage Return
\f
Form Feed
\a
Audible Alert (terminal bell)
\xhh
Any arbitrary character specified by the hexidecimal number hh
\ooo
Any arbitrary character specified by the octal number ooo
\\
A single backslash character

 

USAGE

Specifying MP3 files without any other options displays the existing ID3 tag (if any).

Specifying a track number of 0 reverts an ID3 tag to 1.0 format

Non-specified ID3 fields, if existant, will remain unchanged.

Genres can be specified as numbers or names: -g 17 same as -g Rock

Multiple word fields must be enclosed in quotes (eg: -t "A title")

 

NOTES

Speed Considerations
In order to determine certain technical attributes (playing time, number of frames, number of bad frames, and in a few cases the bit rate) with absolute certainty, it would be necessary to read the entire MP3 file. Mp3info normally tries to speed things up by reading a handful of frames from various points in the file and estimating the statistics for the rest of the file based on those samples. Usually, this results in very accurate estimates. Audio playing times are usually off by no more than a second, and the number of frames is off by less than 0.1%. Often the estimates agree exactly with the full scans. Nevertheless, the user may wish to ensure that she is getting exact information.
One should specify the -F switch if one wants mp3info to read the entire MP3 file when determining this information. Note that a full scan will only affect mp3info's output if the -x switch is used or the -p switch is used with a FORMAT_SPECIFIER containing %m, %s, %S, %u or (rarely) %r. Using the -F switch under other conditions will only slow down mp3info. Also note that a FORMAT_SPECIFIER containing %b or a VBR MP3 file will automatically trigger a full scan even if the -F switch is not used.
Several users have noted that the %u specifier used alone:

mp3info -p "%u" song.mp3
sometimes gives a different number of good frames than when used with the %b specifier:
mp3info -p "%u %b" song.mp3
This is because when you use %u by itself, mp3info only estimates the number of frames based on the bitrate and the size of the file. When you use the %b specifier, you force mp3info to do a full scan of the file which guarantees an accurate count of both the good and bad frames. If you want to guarantee an accurate count of the number of good frames when using %u by itself, you should use the -F option.

Bit Rates
MP3 files are made up of many (usally several thousand) audio blocks called 'frames'. Each of these frames is encoded at a specific 'bit rate' which determines both the quality of the sound and the size of the frame itself. Bit rates can range from 8 Kb/s (kilobits per second) to 320 Kb/s. Note that the MP3 specification only allows 14 discreet bit rates for an MP3 file, so, for instance, a stereo MP3 could have frames with bit rates of 128 Kb/s and 160 Kb/s, but nowhere in between.
Audio frames with high bit rates sound much better than those with lower bit rates, but take up more space. Obviously, one would like to use a bit rate that is only high enough to maintain a comfortable level of audio quality. Normally, all the frames in an MP3 file are encoded at the same bit rate. A few MP3 files, however, are encoded such that the bit rate may vary from one frame to the next. These MP3 files are called Variable Bit Rate (or VBR) files. Since VBR files do not have one single bit rate, attempting to report the bit rate of the file as a whole can be problematic. Consequently, mp3info allows you to specify how you want this value reported.
The default is to simply print the word 'Variable' where the bit rate would normally appear. Another option is to print the mathematical average of all the frames. This has the advantage of being completely accurate, but the number printed may not correspond to one of the 14 discreet bit rates that would be allowed for that file. The third alternative solves that problem by allowing the bit rate to be reported as the median bit rate which is what you would get if you lined up all the frames in the file by bit rate from lowest to highest and picked the frame closest to the middle of the line.
For more specific usage information, see the -r switch and the %r conversion specifier under the description of -p's FORMAT_SPECIFIER.

 

EXAMPLES

Display existing ID3 tag information (if any) in song.mp3

mp3info song.mp3

Set the title, author and genre of song.mp3. (All other fields unchanged)

mp3info -t "Song Title" -a Author -g "Rock & Roll" song.mp3

Set the album field of all MP3 files in the current directory to "The White Album"

mp3info -l "The White Album" *.mp3

Delete the entire ID3 tag from song1.mp3 and song2.mp3

mp3info -d song1.mp3 song2.mp3

Delete the comment field from the ID3 tags of all MP3 files in the current directory. (All other fields unchanged)

mp3info -c "" *.mp3

Display the Title, Artist, Album, and Year of all MP3 files in the current directory. We include the labels 'File', etc. and insert newlines (\n) to make things more readable for humans:

mp3info -p "File: %f\nTitle: %t\nArtist: %a\nAlbum: %l\nYear: %y\n\n" *.mp3

Say you want to build a spreadsheet of your MP3 files. Here's a command you might use to help you accomplish that. Most spreadsheet programs will import an ASCII file and treat a given character as a field separator. A commonly used field separator is the tab character. For each MP3 file in the current directory, we want to output the filename, title, artist, and album on a single line and have the fields separated by a tab (\t) character. Note that you must include a newline (\n) at the end of the format string in order to get each file's information on a separate line. Here's the command:

mp3info -p "%f\t%t\t%a\t%l\t%y\n" *.mp3

Some spreadsheets or other software may allow importing data from flat files where each field is a specific width. Here's where the format modifers come into play. This next command outputs the same information as the command above, but uses fixed-width fields instead of tab separators. The filename field is defined as 50 characters wide, the title field is defined as 31 characters wide, and so on.

mp3info -p "%50f%31t%31a%31l%4y\n" *.mp3

The problem with the output of this command is that all strings are normally right- justified within their fields. This looks a little odd since most western languages read from left to right. In order to make the fields left-justified, add a minus sign (-) in front of the field-width:

mp3info -p "%-50f%-31t%-31a%-31l%-4y\n" *.mp3

Now suppose you just want the running time of each MP3 file specified in minutes and seconds. Simple enough:

mp3info -p "%f: %m:%s\n" *.mp3

You may notice when you do this, however, that leading zeros are not displayed in the seconds field (%s). So for instance, if you had a track four minutes and two seconds long its running time would be displayed as '4:2' instead of '4:02'. In order to tell mp3info to pad an integer field with zeros, you need to use a field width modifier and place a zero in front of it. The following command is the same as the previous one, but it specifies that mp3info is to display the seconds field with a fixed field-width of two characters and to pad the field with leading zeros if necessary:

mp3info -p "%f: %m:%02s\n" *.mp3

The last trick we have to show you is the precision specifier for floating point variables. The following command displays the filename and average bit rate for all MP3 files in the current directory.

mp3info -r a -p "%f %r\n" *.mp3

By default, the floating point value of the average bit rate is displayed with six digits past the decimal point (ex: 175.654332). If you are like me, this seems like a bit of overkill. At most you want one or two digits beyond the decimal place displayed. Or you might not want any. The following command displays the average bit rate with first two, then zero digits beyond the decimal point:

mp3info -r a -p "%f %.2r %.0r\n" *.mp3

If you wanted to specify a field width for a floating point value, you could do that by placing the field-width before the decimal point in the field modifier. This command does just that -- specifying an average bit-rate field six characters wide that will show two digits of precision beyond the decimal point:

mp3info -r a -p "%f %6.2r\n" *.mp3
 

BUGS

There's no "save and quit" in interactive mode. You must fill in all the fields (even if it is with blanks) and let the program finish by itself. CTRL+C does leave MP3info, but the data isn't saved.

Using space to erase tags in interactive mode does not work correctly if you then backspace over the deleted text.

The title, author, album, and comment fields are limited to 30 characters. This is a limitation of the ID3 1.0 tag format, not MP3Info. If you specify the track number (with the -n switch), the ID3 1.0 tag becomes a 1.1 tag and the comment field is limited to 28 characters. This is because the difference between ID3 1.0 and 1.1 is that the tag number is stored in the last byte of the comment field. This trick "borrows" two bytes from the fixed-length comment field effectively reducing the maximum comment by two characters.

Genres cannot be specified arbitrarily. They must be specified from a pre-determined list (use mp3info -G to see that list). Again, this is a limitation of the ID3 1.0 tag format.

Only ID3 versions 1.0 and 1.1 are supported. ID3V2 is a much more powerful standard and is planned for some as-yet-undetermined future version. Unfortunately, a clean implementation is a heck of a lot of work and I'm unbelievably lazy, so don't hold your breath. It is probably worth noting at this juncture, however, that I do accept patches. :-)

Exit codes are somewhat haphazard and not well documented.

 

AUTHOR

Cedric Tefft <cedric@phreaker.net>

 

SEE ALSO

printf(3)


 

Index

NAME
SYNOPSIS
DESCRIPTION
OPTIONS
USAGE
NOTES
EXAMPLES
BUGS
AUTHOR
SEE ALSO

This document was created by man2html on November 6, 2006. mp3info_0.8.5a.orig/mp3info.lsm0000644000000000000000000000152110763631155016521 0ustar00usergroup00000000000000Begin4 Title: mp3info Version: 0.8.1 Entered-date: 2000-08-18 Description: An MP3 technical info viewer and ID3 1.x tag editor. MP3Info has an interactive mode (using curses) and a command line mode. A separate executable includes a GTK-based GUI version. MP3Info can display ID3 tag information as well as various techincal aspects of an MP3 file including playing time, bit-rate, sampling frequency and other attributes in a pre-defined or user-specifiable output format. Keywords: mp3, id3, console, gtk, audio, sound Author: cedric@earthling.net (Cedric Tefft) Maintained-by: cedric@earthling.net (Cedric Tefft) Primary-site: ftp://metalab.unc.edu/pub/linux/apps/sound/mp3-utils/mp3info mp3info-0.8.1.tgz mp3info-0.8.1-1.i386.rpm Alternate-site: ftp://ftp.freesoftware.com/pub/linux/sunsite/apps/sound/mp3-utils/mp3info/ Copying-policy: GPL Endmp3info_0.8.5a.orig/mp3info.mdsp0000644000000000000000000000310110763631155016665 0ustar00usergroup00000000000000[Project] name=MP3Info type=0 defaultConfig=1 [Debug] // compiler workingDirectory= arguments= intermediateFilesDirectory=Debug outputFilesDirectory=Debug compilerPreprocessor= extraCompilerOptions= compilerIncludeDirectory= noWarning=0 defaultWarning=0 allWarning=1 extraWarning=0 isoWarning=0 warningsAsErrors=0 debugType=1 debugLevel=2 exceptionEnabled=1 runtimeTypeEnabled=1 optimizeLevel=0 // linker libraryPath= outputFilename=Debug\mp3info.exe libraries=win32\pdcurses.a extraLinkerOptions= ignoreStartupFile=0 ignoreDefaultLibs=0 stripExecutableFile=0 // archive extraArchiveOptions= //resource resourcePreprocessor= resourceIncludeDirectory= extraResourceOptions= [Release] // compiler workingDirectory= arguments= intermediateFilesDirectory=Release outputFilesDirectory=Release compilerPreprocessor= extraCompilerOptions= compilerIncludeDirectory= noWarning=0 defaultWarning=0 allWarning=1 extraWarning=0 isoWarning=0 warningsAsErrors=0 debugType=0 debugLevel=1 exceptionEnabled=1 runtimeTypeEnabled=1 optimizeLevel=2 // linker libraryPath= outputFilename=Release\mp3info.exe libraries=win32\pdcurses.a extraLinkerOptions= ignoreStartupFile=0 ignoreDefaultLibs=0 stripExecutableFile=1 // archive extraArchiveOptions= //resource resourcePreprocessor= resourceIncludeDirectory= extraResourceOptions= [Source] 1=mp3curs.c 2=mp3info.c 3=mp3tech.c 4=textfunc.c 5=win32\getopt.c 6=win32\truncate.c [Header] 1=mp3info.h 2=mp3tech.h 3=textfunc.h 4=win32\curses.h [Resource] [Other] [History] mp3info_0.8.5a.orig/mp3info.spec0000644000000000000000000000505010763631155016661 0ustar00usergroup00000000000000%define name mp3info %define version 0.8.5a %define release 1 Summary: An MP3 technical info viewer and ID3 v1.x tag editor Name: %{name} Version: %{version} Release: %{release} Packager: %{packager} Vendor: %{vendor} License: GPL Group: Utilities/file Source: ftp://ftp.ibiblio.org/pub/linux/apps/sound/mp3-utils/mp3info/%{name}-%{version}.tgz BuildRoot: /tmp/%{name} %description MP3Info is an MP3 technical info viewer and ID3 1.x tag editor. MP3Info has an interactive mode (using curses) and a command line mode. A separate executable includes a GTK-based GUI version. MP3Info can display ID3 tag information as well as various techincal aspects of an MP3 file including playing time, bit-rate, sampling frequency and other attributes in a pre-defined or user-specifiable output format. %prep %setup -q mkdir -p $RPM_BUILD_ROOT/usr/share/doc/%{name}-%{version} mkdir -p $RPM_BUILD_ROOT/usr/bin mkdir -p $RPM_BUILD_ROOT/usr/X11R6/bin mkdir -p $RPM_BUILD_ROOT/usr/man/man1 %build make strip mp3info strip gmp3info %install mv mp3info $RPM_BUILD_ROOT/usr/bin/mp3info mv gmp3info $RPM_BUILD_ROOT/usr/X11R6/bin/gmp3info mv ChangeLog README INSTALL LICENSE mp3info.txt mp3info.html $RPM_BUILD_ROOT/usr/share/doc/%{name}-%{version} mv mp3info.1 $RPM_BUILD_ROOT/usr/man/man1 %post %postun %clean rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,root) /usr/bin/mp3info /usr/X11R6/bin/gmp3info /usr/man/man1/mp3info.1.gz %doc /usr/share/doc/%{name}-%{version} %changelog * Mon Nov 6 2006 Cedric Tefft - Added 'make install-mp3info' and 'make install-gmp3info' options to Makefile (Felix Kronlage) - Fixed a bug in the windows version that caused it to blow up or give erroneous output on certain MP3 files - Added handling of 'free form' bitrate frames, the lack of which was causing segfaults on AMD 64-bit sytems - Tweaked code to eliminate various gcc warnings and errors - Improved detection of invalid MP3 frames (Ben Bennett) - Updated gmp3info for GTK 2 (Eric Lassauge) - Miscellaneous documentation updates and corrections * Mon Jul 16 2001 Cedric Tefft - Added %k format specifier to allow printing of the file size in formatted text output (-p option) - Rearranged some items in the man page and quick help (-h) to make them more readable. - Fixed minor logic bug in mp3tech - Now compiles under CYGWIN32 - Manual page typos fixed - Now correctly recognizes and reports MPEG version 2.5 files - Clearing individual ID3 fields can now be accomplished by passing a blank argument ("") to any tag setting switch (-t, -a, etc.) mp3info_0.8.5a.orig/mp3info.txt0000644000000000000000000004061310763631155016552 0ustar00usergroup00000000000000mp3info(1) mp3info(1) NAME mp3info - MP3 technical info viewer and ID3 tag editor SYNOPSIS mp3info [ -h | -G ] mp3info [-x] [-F] [-r a|m|v] [-p FORMAT_STRING] file... mp3info [-d] file... mp3info [-i] [-t title] [-a artist] [-l album] [-y year] [-c comment] [-n track] [-g genre] file... DESCRIPTION mp3info is a utility used to read and modify the ID3 tags in MPEG layer 3 (MP3) files. It can also (optionally) display various technical attributes of the MP3 file. OPTIONS -a artist Specify ID3 artist name -c comment Specify ID3 comment -g genre Specify ID3 genre (use -G option for a list of valid genres). You may specify either a genre name or a number. -l album Specify ID3 album name -n track Specify ID3 v1.1 track number -t title Specify ID3 track title -y year Specify ID3 copyright year -G Display a list of valid genres and their associated numeric codes. These are the only values accepted by the -g switch. -h Display a help page -x Display technical attributes of the MP3 file -r a|m|v Report bit rate of Variable Bit Rate (VBR) files as one of the following (See the section below entitled Bit Rates for more information): a - Average bit rate [float](Note: this option also causes the bit rates of non-VBR files to be displayed as floating point values). m - Median bit rate [integer] v - Simply use the word 'Variable' [string] (this is the default). -i Edit ID3 tag interactively (uses curses/ncurses functions) -d Delete ID3 tag (if one exists) -f Force Mode: Treat all files as MP3s even if MP3 frames can't be found -F Do a Full scan for technical information (see the section Speed Considerations below for more information) -p "FORMAT_STRING" Print MP3 attributes according to FORMAT_STRING. FORMAT_STRING is similar to a printf(3) format string in that it is printed verbatim except for the following conversions and escape sequences. Any conversion specifier may optionally include the various alignment, precision, and field width modifiers accepted by printf(3). See the EXAMPLES section below for examples of how format strings are used in mp3info. Conversion Specifiers %f Filename without the path [string] %F Filename with the path [string] %k File size in KB [integer] %a Artist [string] %c Comment [string] %g Musical genre [string] %G Musical genre number [integer] %l Album name [string] %n Track [integer] %t Track Title [string] %y Year [string] %C Copyright flag [string] %e Emphasis [string] %E CRC Error protection [string] %L MPEG Layer [string] %O Original material flag [string] %o Stereo/mono mode [string] %p Padding [string] %v MPEG Version [float] %u Number of good audio frames [integer] %b Number of corrupt audio frames [integer] %Q Sampling frequency in Hz [integer] %q Sampling frequency in KHz [integer] %r Bit Rate in KB/s (type and meaning affected by -r option) %m Playing time: minutes only [integer] %s Playing time: seconds only [integer] (usually used in conjunction with %m) %S Total playing time in seconds [integer] %% A single percent sign Escape Sequences \n Newline \t Horizontal tab \v Vertical tab \b Backspace \r Carriage Return \f Form Feed \a Audible Alert (terminal bell) \xhh Any arbitrary character specified by the hexidecimal number hh \ooo Any arbitrary character specified by the octal number ooo \\ A single backslash character USAGE Specifying MP3 files without any other options displays the existing ID3 tag (if any). Specifying a track number of 0 reverts an ID3 tag to 1.0 format Non-specified ID3 fields, if existant, will remain unchanged. Genres can be specified as numbers or names: -g 17 same as -g Rock Multiple word fields must be enclosed in quotes (eg: -t "A title") NOTES Speed Considerations In order to determine certain technical attributes (playing time, number of frames, number of bad frames, and in a few cases the bit rate) with absolute certainty, it would be necessary to read the entire MP3 file. Mp3info normally tries to speed things up by reading a handful of frames from various points in the file and estimating the statistics for the rest of the file based on those samples. Usually, this results in very accurate estimates. Audio playing times are usually off by no more than a second, and the number of frames is off by less than 0.1%. Often the estimates agree exactly with the full scans. Never- theless, the user may wish to ensure that she is getting exact information. One should specify the -F switch if one wants mp3info to read the entire MP3 file when determining this information. Note that a full scan will only affect mp3info's output if the -x switch is used or the -p switch is used with a FORMAT_SPECIFIER containing %m, %s, %S, %u or (rarely) %r. Using the -F switch under other conditions will only slow down mp3info. Also note that a FORMAT_SPECIFIER containing %b or a VBR MP3 file will automatically trigger a full scan even if the -F switch is not used. Several users have noted that the %u specifier used alone: mp3info -p "%u" song.mp3 sometimes gives a different number of good frames than when used with the %b specifier: mp3info -p "%u %b" song.mp3 This is because when you use %u by itself, mp3info only esti- mates the number of frames based on the bitrate and the size of the file. When you use the %b specifier, you force mp3info to do a full scan of the file which guarantees an accurate count of both the good and bad frames. If you want to guarantee an accu- rate count of the number of good frames when using %u by itself, you should use the -F option. Bit Rates MP3 files are made up of many (usally several thousand) audio blocks called 'frames'. Each of these frames is encoded at a specific 'bit rate' which determines both the quality of the sound and the size of the frame itself. Bit rates can range from 8 Kb/s (kilobits per second) to 320 Kb/s. Note that the MP3 specification only allows 14 discreet bit rates for an MP3 file, so, for instance, a stereo MP3 could have frames with bit rates of 128 Kb/s and 160 Kb/s, but nowhere in between. Audio frames with high bit rates sound much better than those with lower bit rates, but take up more space. Obviously, one would like to use a bit rate that is only high enough to main- tain a comfortable level of audio quality. Normally, all the frames in an MP3 file are encoded at the same bit rate. A few MP3 files, however, are encoded such that the bit rate may vary from one frame to the next. These MP3 files are called Variable Bit Rate (or VBR) files. Since VBR files do not have one sin- gle bit rate, attempting to report the bit rate of the file as a whole can be problematic. Consequently, mp3info allows you to specify how you want this value reported. The default is to simply print the word 'Variable' where the bit rate would normally appear. Another option is to print the mathematical average of all the frames. This has the advantage of being completely accurate, but the number printed may not correspond to one of the 14 discreet bit rates that would be allowed for that file. The third alternative solves that prob- lem by allowing the bit rate to be reported as the median bit rate which is what you would get if you lined up all the frames in the file by bit rate from lowest to highest and picked the frame closest to the middle of the line. For more specific usage information, see the -r switch and the %r conversion specifier under the description of -p's FOR- MAT_SPECIFIER. EXAMPLES Display existing ID3 tag information (if any) in song.mp3 mp3info song.mp3 Set the title, author and genre of song.mp3. (All other fields unchanged) mp3info -t "Song Title" -a Author -g "Rock & Roll" song.mp3 Set the album field of all MP3 files in the current directory to "The White Album" mp3info -l "The White Album" *.mp3 Delete the entire ID3 tag from song1.mp3 and song2.mp3 mp3info -d song1.mp3 song2.mp3 Delete the comment field from the ID3 tags of all MP3 files in the cur- rent directory. (All other fields unchanged) mp3info -c "" *.mp3 Display the Title, Artist, Album, and Year of all MP3 files in the cur- rent directory. We include the labels 'File', etc. and insert newlines (\n) to make things more readable for humans: mp3info -p "File: %f\nTitle: %t\nArtist: %a\nAlbum: %l\nYear: %y\n\n" *.mp3 Say you want to build a spreadsheet of your MP3 files. Here's a com- mand you might use to help you accomplish that. Most spreadsheet pro- grams will import an ASCII file and treat a given character as a field separator. A commonly used field separator is the tab character. For each MP3 file in the current directory, we want to output the filename, title, artist, and album on a single line and have the fields separated by a tab (\t) character. Note that you must include a newline (\n) at the end of the format string in order to get each file's information on a separate line. Here's the command: mp3info -p "%f\t%t\t%a\t%l\t%y\n" *.mp3 Some spreadsheets or other software may allow importing data from flat files where each field is a specific width. Here's where the format modifers come into play. This next command outputs the same informa- tion as the command above, but uses fixed-width fields instead of tab separators. The filename field is defined as 50 characters wide, the title field is defined as 31 characters wide, and so on. mp3info -p "%50f%31t%31a%31l%4y\n" *.mp3 The problem with the output of this command is that all strings are normally right- justified within their fields. This looks a little odd since most western languages read from left to right. In order to make the fields left-justified, add a minus sign (-) in front of the field- width: mp3info -p "%-50f%-31t%-31a%-31l%-4y\n" *.mp3 Now suppose you just want the running time of each MP3 file specified in minutes and seconds. Simple enough: mp3info -p "%f: %m:%s\n" *.mp3 You may notice when you do this, however, that leading zeros are not displayed in the seconds field (%s). So for instance, if you had a track four minutes and two seconds long its running time would be dis- played as '4:2' instead of '4:02'. In order to tell mp3info to pad an integer field with zeros, you need to use a field width modifier and place a zero in front of it. The following command is the same as the previous one, but it specifies that mp3info is to display the seconds field with a fixed field-width of two characters and to pad the field with leading zeros if necessary: mp3info -p "%f: %m:%02s\n" *.mp3 The last trick we have to show you is the precision specifier for floating point variables. The following command displays the filename and average bit rate for all MP3 files in the current directory. mp3info -r a -p "%f %r\n" *.mp3 By default, the floating point value of the average bit rate is dis- played with six digits past the decimal point (ex: 175.654332). If you are like me, this seems like a bit of overkill. At most you want one or two digits beyond the decimal place displayed. Or you might not want any. The following command displays the average bit rate with first two, then zero digits beyond the decimal point: mp3info -r a -p "%f %.2r %.0r\n" *.mp3 If you wanted to specify a field width for a floating point value, you could do that by placing the field-width before the decimal point in the field modifier. This command does just that -- specifying an aver- age bit-rate field six characters wide that will show two digits of precision beyond the decimal point: mp3info -r a -p "%f %6.2r\n" *.mp3 BUGS There's no "save and quit" in interactive mode. You must fill in all the fields (even if it is with blanks) and let the program finish by itself. CTRL+C does leave MP3info, but the data isn't saved. Using space to erase tags in interactive mode does not work correctly if you then backspace over the deleted text. The title, author, album, and comment fields are limited to 30 charac- ters. This is a limitation of the ID3 1.0 tag format, not MP3Info. If you specify the track number (with the -n switch), the ID3 1.0 tag becomes a 1.1 tag and the comment field is limited to 28 characters. This is because the difference between ID3 1.0 and 1.1 is that the tag number is stored in the last byte of the comment field. This trick "borrows" two bytes from the fixed-length comment field effectively reducing the maximum comment by two characters. Genres cannot be specified arbitrarily. They must be specified from a pre-determined list (use mp3info -G to see that list). Again, this is a limitation of the ID3 1.0 tag format. Only ID3 versions 1.0 and 1.1 are supported. ID3V2 is a much more pow- erful standard and is planned for some as-yet-undetermined future ver- sion. Unfortunately, a clean implementation is a heck of a lot of work and I'm unbelievably lazy, so don't hold your breath. It is probably worth noting at this juncture, however, that I do accept patches. :-) Exit codes are somewhat haphazard and not well documented. AUTHOR Cedric Tefft SEE ALSO printf(3) mp3info November 6, 2006 mp3info(1) mp3info_0.8.5a.orig/mp3tech.c0000644000000000000000000002506010763631155016144 0ustar00usergroup00000000000000/* mp3tech.c - Functions for handling MP3 files and most MP3 data structure manipulation. Copyright (C) 2000-2006 Cedric Tefft This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You 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. *************************************************************************** This file is based in part on: * MP3Info 0.5 by Ricardo Cerqueira * MP3Stat 0.9 by Ed Sweetman and Johannes Overmann */ #include "mp3info.h" int layer_tab[4]= {0, 3, 2, 1}; int frequencies[3][4] = { {22050,24000,16000,50000}, /* MPEG 2.0 */ {44100,48000,32000,50000}, /* MPEG 1.0 */ {11025,12000,8000,50000} /* MPEG 2.5 */ }; int bitrate[2][3][15] = { { /* MPEG 2.0 */ {0,32,48,56,64,80,96,112,128,144,160,176,192,224,256}, /* layer 1 */ {0,8,16,24,32,40,48,56,64,80,96,112,128,144,160}, /* layer 2 */ {0,8,16,24,32,40,48,56,64,80,96,112,128,144,160} /* layer 3 */ }, { /* MPEG 1.0 */ {0,32,64,96,128,160,192,224,256,288,320,352,384,416,448}, /* layer 1 */ {0,32,48,56,64,80,96,112,128,160,192,224,256,320,384}, /* layer 2 */ {0,32,40,48,56,64,80,96,112,128,160,192,224,256,320} /* layer 3 */ } }; int frame_size_index[] = {24000, 72000, 72000}; char *mode_text[] = { "stereo", "joint stereo", "dual channel", "mono" }; char *emphasis_text[] = { "none", "50/15 microsecs", "reserved", "CCITT J 17" }; int get_mp3_info(mp3info *mp3,int scantype, int fullscan_vbr) { int had_error = 0; int frame_type[15]={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; float seconds=0,total_rate=0; int frames=0,frame_types=0,frames_so_far=0; int l,vbr_median=-1; int bitrate,lastrate; int counter=0; mp3header header; struct stat filestat; off_t sample_pos,data_start=0; stat(mp3->filename,&filestat); mp3->datasize=filestat.st_size; get_id3(mp3); if(scantype == SCAN_QUICK) { if(get_first_header(mp3,0L)) { data_start=ftell(mp3->file); lastrate=15-mp3->header.bitrate; while((counter < NUM_SAMPLES) && lastrate) { sample_pos=(counter*(mp3->datasize/NUM_SAMPLES+1))+data_start; if(get_first_header(mp3,sample_pos)) { bitrate=15-mp3->header.bitrate; } else { bitrate=-1; } if(bitrate != lastrate) { mp3->vbr=1; if(fullscan_vbr) { counter=NUM_SAMPLES; scantype=SCAN_FULL; } } lastrate=bitrate; counter++; } if(!(scantype == SCAN_FULL)) { mp3->frames=(mp3->datasize-data_start)/(l=frame_length(&mp3->header)); mp3->seconds = (int)((float)(frame_length(&mp3->header)*mp3->frames)/ (float)(header_bitrate(&mp3->header)*125)+0.5); mp3->vbr_average = (float)header_bitrate(&mp3->header); } } } if(scantype == SCAN_FULL) { if(get_first_header(mp3,0L)) { data_start=ftell(mp3->file); while((bitrate=get_next_header(mp3))) { frame_type[15-bitrate]++; frames++; } memcpy(&header,&(mp3->header),sizeof(mp3header)); for(counter=0;counter<15;counter++) { if(frame_type[counter]) { frame_types++; header.bitrate=counter; frames_so_far += frame_type[counter]; seconds += (float)(frame_length(&header)*frame_type[counter])/ (float)(header_bitrate(&header)*125); total_rate += (float)((header_bitrate(&header))*frame_type[counter]); if((vbr_median == -1) && (frames_so_far >= frames/2)) vbr_median=counter; } } mp3->seconds=(int)(seconds+0.5); mp3->header.bitrate=vbr_median; mp3->vbr_average=total_rate/(float)frames; mp3->frames=frames; if(frame_types > 1) { mp3->vbr=1; } } } return had_error; } int get_first_header(mp3info *mp3, long startpos) { int k, l=0,c; mp3header h, h2; long valid_start=0; fseek(mp3->file,startpos,SEEK_SET); while (1) { while((c=fgetc(mp3->file)) != 255 && (c != EOF)); if(c == 255) { ungetc(c,mp3->file); valid_start=ftell(mp3->file); if((l=get_header(mp3->file,&h))) { fseek(mp3->file,l-FRAME_HEADER_SIZE,SEEK_CUR); for(k=1; (k < MIN_CONSEC_GOOD_FRAMES) && (mp3->datasize-ftell(mp3->file) >= FRAME_HEADER_SIZE); k++) { if(!(l=get_header(mp3->file,&h2))) break; if(!sameConstant(&h,&h2)) break; fseek(mp3->file,l-FRAME_HEADER_SIZE,SEEK_CUR); } if(k == MIN_CONSEC_GOOD_FRAMES) { fseek(mp3->file,valid_start,SEEK_SET); memcpy(&(mp3->header),&h2,sizeof(mp3header)); mp3->header_isvalid=1; return 1; } } } else { return 0; } } return 0; } /* get_next_header() - read header at current position or look for the next valid header if there isn't one at the current position */ int get_next_header(mp3info *mp3) { int l=0,c,skip_bytes=0; mp3header h; while(1) { while((c=fgetc(mp3->file)) != 255 && (ftell(mp3->file) < mp3->datasize)) skip_bytes++; if(c == 255) { ungetc(c,mp3->file); if((l=get_header(mp3->file,&h))) { if(skip_bytes) mp3->badframes++; fseek(mp3->file,l-FRAME_HEADER_SIZE,SEEK_CUR); return 15-h.bitrate; } else { skip_bytes += FRAME_HEADER_SIZE; } } else { if(skip_bytes) mp3->badframes++; return 0; } } } /* Get next MP3 frame header. Return codes: positive value = Frame Length of this header 0 = No, we did not retrieve a valid frame header */ int get_header(FILE *file,mp3header *header) { unsigned char buffer[FRAME_HEADER_SIZE]; int fl; if(fread(&buffer,FRAME_HEADER_SIZE,1,file)<1) { header->sync=0; return 0; } header->sync=(((int)buffer[0]<<4) | ((int)(buffer[1]&0xE0)>>4)); if(buffer[1] & 0x10) header->version=(buffer[1] >> 3) & 1; else header->version=2; header->layer=(buffer[1] >> 1) & 3; header->bitrate=(buffer[2] >> 4) & 0x0F; if((header->sync != 0xFFE) || (header->layer != 1) || (header->bitrate == 0xF)) { header->sync=0; return 0; } header->crc=buffer[1] & 1; header->freq=(buffer[2] >> 2) & 0x3; header->padding=(buffer[2] >>1) & 0x1; header->extension=(buffer[2]) & 0x1; header->mode=(buffer[3] >> 6) & 0x3; header->mode_extension=(buffer[3] >> 4) & 0x3; header->copyright=(buffer[3] >> 3) & 0x1; header->original=(buffer[3] >> 2) & 0x1; header->emphasis=(buffer[3]) & 0x3; /* Final sanity checks: bitrate 1111b and frequency 11b are reserved (invalid) */ if (header->bitrate == 0x0F || header->freq == 0x3) { return 0; } return ((fl=frame_length(header)) >= MIN_FRAME_SIZE ? fl : 0); } int frame_length(mp3header *header) { return header->sync == 0xFFE ? (frame_size_index[3-header->layer]*((header->version&1)+1)* header_bitrate(header)/header_frequency(header))+ header->padding : 1; } int header_layer(mp3header *h) {return layer_tab[h->layer];} int header_bitrate(mp3header *h) { return bitrate[h->version & 1][3-h->layer][h->bitrate]; } int header_frequency(mp3header *h) { return frequencies[h->version][h->freq]; } char *header_emphasis(mp3header *h) { return emphasis_text[h->emphasis]; } char *header_mode(mp3header *h) { return mode_text[h->mode]; } int sameConstant(mp3header *h1, mp3header *h2) { if((*(uint*)h1) == (*(uint*)h2)) return 1; if((h1->version == h2->version ) && (h1->layer == h2->layer ) && (h1->crc == h2->crc ) && (h1->freq == h2->freq ) && (h1->mode == h2->mode ) && (h1->copyright == h2->copyright ) && (h1->original == h2->original ) && (h1->emphasis == h2->emphasis )) return 1; else return 0; } int get_id3(mp3info *mp3) { int retcode=0; char fbuf[4]; if(mp3->datasize >= 128) { if(fseek(mp3->file, -128, SEEK_END )) { fprintf(stderr,"ERROR: Couldn't read last 128 bytes of %s!!\n",mp3->filename); retcode |= 4; } else { fread(fbuf,1,3,mp3->file); fbuf[3] = '\0'; mp3->id3.genre[0]=255; if (!strcmp((const char *)"TAG",(const char *)fbuf)) { mp3->id3_isvalid=1; mp3->datasize -= 128; fseek(mp3->file, -125, SEEK_END); fread(mp3->id3.title,1,30,mp3->file); mp3->id3.title[30] = '\0'; fread(mp3->id3.artist,1,30,mp3->file); mp3->id3.artist[30] = '\0'; fread(mp3->id3.album,1,30,mp3->file); mp3->id3.album[30] = '\0'; fread(mp3->id3.year,1,4,mp3->file); mp3->id3.year[4] = '\0'; fread(mp3->id3.comment,1,30,mp3->file); mp3->id3.comment[30] = '\0'; if(mp3->id3.comment[28] == '\0') { mp3->id3.track[0] = mp3->id3.comment[29]; } fread(mp3->id3.genre,1,1,mp3->file); unpad(mp3->id3.title); unpad(mp3->id3.artist); unpad(mp3->id3.album); unpad(mp3->id3.year); unpad(mp3->id3.comment); } } } return retcode; } char *pad(char *string, int length) { int l; l=strlen(string); while(lid3.title,TEXT_FIELD_LEN); strncat(buf,mp3->id3.title,TEXT_FIELD_LEN); pad(mp3->id3.artist,TEXT_FIELD_LEN); strncat(buf,mp3->id3.artist,TEXT_FIELD_LEN); pad(mp3->id3.album,TEXT_FIELD_LEN); strncat(buf,mp3->id3.album,TEXT_FIELD_LEN); pad(mp3->id3.year,INT_FIELD_LEN); strncat(buf,mp3->id3.year,INT_FIELD_LEN); pad(mp3->id3.comment,TEXT_FIELD_LEN); strncat(buf,mp3->id3.comment,TEXT_FIELD_LEN); strncat(buf,(char *)&(mp3->id3.genre),1); if (mp3->id3.track[0] != '\0') { buf[125]='\0'; buf[126]=mp3->id3.track[0]; } fseek(mp3->file,-128*mp3->id3_isvalid,SEEK_END); return (int)fwrite(buf,1,128,mp3->file); } mp3info_0.8.5a.orig/mp3tech.h0000644000000000000000000000525510763631155016155 0ustar00usergroup00000000000000/* mp3tech.h - Headers for mp3tech.c Copyright (C) 2000-2006 Cedric Tefft This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You 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. *************************************************************************** This file is based in part on: * MP3Info 0.5 by Ricardo Cerqueira * MP3Stat 0.9 by Ed Sweetman and Johannes Overmann */ /* MIN_CONSEC_GOOD_FRAMES defines how many consecutive valid MP3 frames we need to see before we decide we are looking at a real MP3 file */ #define MIN_CONSEC_GOOD_FRAMES 4 #define FRAME_HEADER_SIZE 4 #define MIN_FRAME_SIZE 21 #define NUM_SAMPLES 4 enum VBR_REPORT { VBR_VARIABLE, VBR_AVERAGE, VBR_MEDIAN }; enum SCANTYPE { SCAN_NONE, SCAN_QUICK, SCAN_FULL }; typedef struct { unsigned long sync; unsigned int version; unsigned int layer; unsigned int crc; unsigned int bitrate; unsigned int freq; unsigned int padding; unsigned int extension; unsigned int mode; unsigned int mode_extension; unsigned int copyright; unsigned int original; unsigned int emphasis; } mp3header; typedef struct { char title[31]; char artist[31]; char album[31]; char year[5]; char comment[31]; unsigned char track[1]; unsigned char genre[1]; } id3tag; typedef struct { char *filename; FILE *file; off_t datasize; int header_isvalid; mp3header header; int id3_isvalid; id3tag id3; int vbr; float vbr_average; int seconds; int frames; int badframes; } mp3info; int get_header(FILE *file,mp3header *header); int frame_length(mp3header *header); int header_layer(mp3header *h); int header_bitrate(mp3header *h); int sameConstant(mp3header *h1, mp3header *h2); int get_mp3_info(mp3info *mp3,int scantype, int fullscan_vbr); int get_id3(mp3info *mp3); char *pad(char *string, int length); char *unpad(char *string); int write_tag(mp3info *mp3); int header_frequency(mp3header *h); char *header_emphasis(mp3header *h); char *header_mode(mp3header *h); int get_first_header(mp3info *mp3,long startpos); int get_next_header(mp3info *mp3); mp3info_0.8.5a.orig/textfunc.c0000644000000000000000000002626410763631155016450 0ustar00usergroup00000000000000/* textfunc.c - Handles most console I/O and interface tasks Copyright (C) 2000-2006 Cedric Tefft This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You 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. *************************************************************************** This program is based in part on MP3Info 0.5 by Ricardo Cerqueira */ #include "mp3info.h" char *layer_text[] = { "I", "II", "III" }; /* * Name of this one is quite obvious... */ void CenterText(int line, char *text) { mvprintw(line,(COLS/2)-((int)strlen(text)/2),text); } /* Convert hex digit to integer */ int xtoi(char *string) { char chr=toupper(string[0]); if(chr > '9') return (int) (chr - 'A' + 10); else return (int) (chr - '0'); } /* * Another one with an obvious name :-) */ void display_help() { printf("%s %s\n\nUSAGE:\n\n",VERSION,COPYRIGHT); printf("\tmp3info [ -h | -G ]\n"\ "\n\tmp3info [-x] [-F] [-r a|m|v] [-p FORMAT_STRING] file(s)\n"\ "\n\tmp3info [-d] file(s)\n"\ "\n\tmp3info [-i] [-t title] [-a artist] [-l album] [-y year]\n"\ "\t\t[-c comment] [-n track] [-g genre] file(s)\n"\ "\nOPTIONS\n"\ "\t-a artist\tSpecify ID3 artist name\n"\ "\t-c comment\tSpecify ID3 comment\n"\ "\t-g genre\tSpecify ID3 genre (use -G for genre list)\n"\ "\t-l album\tSpecify ID3 album name\n"\ "\t-n track\tSpecify ID3 v1.1 track number\n"\ "\t-t title\tSpecify ID3 track title\n"\ "\t-y year\t\tSpecify ID3 copyright year\n\n"\ "\t-G\t\tDisplay valid genres\n"\ "\t-h\t\tDisplay this help page\n"\ "\t-x\t\tDisplay technical attributes of the MP3 file\n"\ "\t-r a|m|v\tReport bit rate of (VBR) files as:\n"\ "\t\ta - Average bit rate (float)\n"\ "\t\tm - Median bit rate (integer)\n"\ "\t\tv - Simply use the word 'Variable' (string) [default]\n\n"\ "\t-i\t\tEdit ID3 tag interactively\n"\ "\t-d\t\tDelete ID3 tag (if one exists)\n"\ "\t-f\t\tForce processing if file is not a standard MP3\n"\ "\t-F\t\tFull Scan (see man page for details)\n"\ "\n\n\t-p \"FORMAT_STRING\" Print FORMAT_STRING with substitutions\n"\ "\n\t\tConversion Specifiers\n\n"\ "\t\t%%f\tFilename without the path (string)\n"\ "\t\t%%F\tFilename with the path (string)\n"\ "\t\t%%k\tFile size in KB (integer)\n"\ "\n\t\t%%a\tArtist (string)\n"\ "\t\t%%c\tComment (string)\n"\ "\t\t%%g\tMusical genre (string)\n"\ "\t\t%%G\tMusical genre (integer)\n"\ "\t\t%%l\tAlbum name (string)\n"\ "\t\t%%n\tTrack (integer)\n"\ "\t\t%%t\tTrack Title (string)\n"\ "\t\t%%y\tYear (string)\n"\ "\n\t\t%%C\tCopyright flag (string)\n"\ "\t\t%%e\tEmphasis (string)\n"\ "\t\t%%E\tCRC Error protection (string)\n"\ "\t\t%%L\tMPEG Layer (string)\n"\ "\t\t%%O\tOriginal material flag (string)\n"\ "\t\t%%o\tStereo/mono mode (string)\n"\ "\t\t%%p\tPadding (string)\n"\ "\t\t%%v\tMPEG Version (float)\n"\ "\n\t\t%%u\tNumber of good audio frames (integer)\n"\ "\t\t%%b\tNumber of corrupt audio frames (integer)\n"\ "\t\t%%Q\tSampling frequency in Hz (integer)\n"\ "\t\t%%q\tSampling frequency in KHz (integer)\n"\ "\t\t%%r\tBit Rate in KB/s (see also '-r')\n"\ "\n\t\t%%m\tPlaying time: minutes only (integer)\n"\ "\t\t%%s\tPlaying time: seconds only (integer)\n"\ "\t\t%%S\tTotal playing time in seconds (integer)\n"\ "\n\t\t%%%%\tA single percent sign\n"\ "\n\t\tEscape Sequences\n\n"\ "\t\t\\n\tNewline\n"\ "\t\t\\t\tHorizontal tab\n"\ "\t\t\\v\tVertical tab\n"\ "\t\t\\b\tBackspace\n"\ "\t\t\\r\tCarriage Return\n"\ "\t\t\\f\tForm Feed\n"\ "\t\t\\a\tAudible Alert (terminal bell)\n"\ "\t\t\\xhh\tAny arbitrary character specified by the\n"\ "\t\t\thexidecimal number hh\n"\ "\t\t\\ooo\tAny arbitrary character specified by the\n"\ "\t\t\toctal number ooo\n"\ "\t\t\\\\\tA single backslash character\n\n"\ "This help screen is only a summary of command-line switches\n"\ "See the man page for complete documentation.\n\n"); } void display_genres(int alphagenreindex[],char *typegenre[]) { int i,j,index; printf("Extended MP3 ID3 Genres\n=======================\n"); for(i=0;i MAXGENRE) { num_genre=256; } return num_genre; } void text_genre(unsigned char *genre,char *buffer) { int genre_num = (int) genre[0]; if(genre_num <= MAXGENRE) { sprintf(buffer,"%s",typegenre[genre_num]); } else if(genre_num < 255) { sprintf(buffer,"(UNKNOWN) [%d]",genre_num); } else { buffer[0]='\0'; } } void determine_tasks (char *format_string,int *want_id3,int *scantype, int *fullscan_vbr,int vbr_report) { char *format=format_string; char *percent; while((percent=strchr(format,'%'))) { percent++; while(*percent && (percent[0] != '%' && !isalpha(*percent))) percent++; switch (percent[0]) { case 't': case 'a': case 'l': case 'y': case 'c': case 'n': case 'g': case 'G': *want_id3=1; break; case 'm': case 's': case 'u': case 'S': *fullscan_vbr=1; case 'r': if(vbr_report != VBR_VARIABLE) *fullscan_vbr=1; case 'q': case 'Q': case 'e': case 'E': case 'C': case 'O': case 'v': case 'L': case 'p': case 'o': if(*scantype != SCAN_FULL) *scantype=SCAN_QUICK; break; case 'b': *scantype=SCAN_FULL; break; } format=percent+1; } } void format_output (char *format_string,mp3info *mp3, int vbr_report) { char genre[40]=""; char mod[1000],*percent,*pos,*code; char *format=format_string; int modlen; while((percent=strchr(format,'%'))) { *percent=0; printf(format); *percent='%'; code=percent+1; while(*code && (code[0] != '%' && !isalpha(*code))) code++; if(*code) { modlen=code-percent+1; if(modlen > 1000) { printf("Format modifier beginning at position %d too long!\n",(int)(percent-format)); exit(5); } strncpy(mod,percent,modlen); mod[modlen]=0; mod[modlen-1]='s'; switch (*code) { case 't': printf(mod,mp3->id3.title); break; case 'f': pos = (pos=strrchr(mp3->filename,'/')) ? pos+1 : mp3->filename; printf(mod,pos); break; case 'F': printf(mod,mp3->filename); break; case 'a': printf(mod,mp3->id3.artist); break; case 'l': printf(mod,mp3->id3.album); break; case 'k': mod[modlen-1] = 'd'; printf(mod,mp3->datasize / 1024); break; case 'y': printf(mod,mp3->id3.year); break; case 'c': printf(mod,mp3->id3.comment); break; case 'n': if(mp3->id3_isvalid && mp3->id3.track[0]) { mod[modlen-1]='d'; printf(mod, (int) mp3->id3.track[0]); } break; case 'g': if(mp3->id3_isvalid) { text_genre(mp3->id3.genre,genre); printf(mod,genre); } break; case 'G': if(mp3->id3_isvalid) { mod[modlen-1]='d'; printf(mod,(int) mp3->id3.genre[0]); } break; case 'r': if(mp3->header_isvalid) { if(mp3->vbr && (vbr_report == VBR_VARIABLE)) printf(mod,"Variable"); else if(vbr_report == VBR_AVERAGE) { mod[modlen-1]='f'; printf(mod,mp3->vbr_average); } else { mod[modlen-1]='d'; printf(mod,header_bitrate(&mp3->header)); } } break; case 'q': if(mp3->header_isvalid) { mod[modlen-1]='d'; printf(mod,header_frequency(&mp3->header)/1000); } break; case 'Q': if(mp3->header_isvalid) { mod[modlen-1]='d'; printf(mod,header_frequency(&mp3->header)); } break; case 'e': if(mp3->header_isvalid) { printf(mod,header_emphasis(&mp3->header)); } break; case 'E': if(mp3->header_isvalid) { printf(mod,!mp3->header.crc ? "Yes" : "No"); } break; case 'C': if(mp3->header_isvalid) { printf(mod,mp3->header.copyright ? "Yes" : "No"); } break; case 'O': if(mp3->header_isvalid) { printf(mod,mp3->header.original ? "Yes" : "No"); } break; case 'm': if(mp3->header_isvalid) { mod[modlen-1]='d'; printf(mod,mp3->seconds / 60); } break; case 's': if(mp3->header_isvalid) { mod[modlen-1]='d'; printf(mod,mp3->seconds % 60); } break; case 'S': if(mp3->header_isvalid) { mod[modlen-1]='d'; printf(mod,mp3->seconds); } break; case 'v': if(mp3->header_isvalid) { mod[modlen-1]='f'; printf(mod,mp3->header.version ? ((mp3->header.version==2) ? 2.5 : 1.0) : 2.0); } break; case 'L': if(mp3->header_isvalid) { printf(mod,layer_text[header_layer(&mp3->header)-1]); } break; case 'o': if(mp3->header_isvalid) { printf(mod,header_mode(&mp3->header)); } break; case 'p': if(mp3->header_isvalid) { printf(mod,mp3->header.padding ? "Yes" : "No"); } break; case 'u': if(mp3->header_isvalid) { mod[modlen-1]='d'; printf(mod,mp3->frames); } break; case 'b': if(mp3->header_isvalid) { mod[modlen-1]='d'; printf(mod,mp3->badframes); } break; case '%': printf("%%"); break; default: printf("%%%c",*(code=percent+1)); break; } format=code+1; } } printf(format); } void translate_escapes (char *string) { char *read=string; char *write=string; int val; while(*read) { if(*read == '\\') { read++; switch (*read) { case 'n': *(write++)='\n'; read++; break; case 't': *(write++)='\t'; read++; break; case 'v': *(write++)='\v'; read++; break; case 'b': *(write++)='\b'; read++; break; case 'r': *(write++)='\r'; read++; break; case 'f': *(write++)='\f'; read++; break; case 'a': *(write++)='\a'; read++; break; case 'X': case 'x': read++; /* HEX */ val=0; if(isxdigit(*read)) val=xtoi(read++); if(isxdigit(*read)) val=(val*16) + xtoi(read++); *(write++)=(val % 256); default: if(*read <= '7' && *read >= '0') { /* octal */ val=xtoi(read++); if(*read <= '7' && *read >= '0') val=(val*8) + xtoi(read++); if(*read <= '7' && *read >= '0') val=(val*8) + xtoi(read++); *(write++)=(val % 256); } else { *(write++)=*(read++); break; } } } else { *write++=*read++; } } *write=0; } mp3info_0.8.5a.orig/textfunc.h0000644000000000000000000000315410763631155016446 0ustar00usergroup00000000000000/* textfunc.h - headers for textfunc.h Copyright (C) 2000-2006 Cedric Tefft This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You 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. *************************************************************************** This program is based in part on MP3Info 0.5 by Ricardo Cerqueira */ #define CTRL_C '\003' #define TEXT_FIELD_LEN 30 #define INT_FIELD_LEN 4 void CenterText(int line, char *text); char *checkinput(int c, char *string, int length); char *curs_addparam(WINDOW *win, int line, int length, char *buf); void buildtag(char *buf, id3tag *tag); void display_help(); void display_genres(int alphagenreindex[],char *typegenre[]); unsigned int get_genre (char *genre); void print_header(mp3header *header,off_t filesize); void translate_escapes (char *string); void determine_tasks (char *format_string,int *want_id3,int *scantype, int *fullscan_vbr,int vbr_report); void format_output (char *format_string,mp3info *mp3, int vbr_report); mp3info_0.8.5a.orig/win32/curses.h0000644000000000000000000024725310763631155017066 0ustar00usergroup00000000000000/* *************************************************************************** * This file comprises part of PDCurses. PDCurses is Public Domain software. * You may use this code for whatever purposes you desire. This software * is provided AS IS with NO WARRANTY whatsoever. * Should this software be used in another application, an acknowledgement * that PDCurses code is used would be appreciated, but is not mandatory. * * Any changes which you make to this software which may improve or enhance * it, should be forwarded to the current maintainer for the benefit of * other users. * * The only restriction placed on this code is that no distribution of * modified PDCurses code be made under the PDCurses name, by anyone * other than the current maintainer. * * See the file maintain.er for details of the current maintainer. *************************************************************************** */ /* $Id: curses.h,v 1.15 2002/11/27 11:22:46 mark Exp $ */ /* *---------------------------------------------------------------------- * PDCurses *---------------------------------------------------------------------- * MH * 991212 2.4 * Key modifiers pressed by themselves are now returned as keys * KEY_SHIFT_L KEY_SHIFT_R * KEY_CONTROL_L KEY_CONTROL_R * KEY_ALT_L KEY_ALT_R * This works on Win32 and X11 ports only * Added support for lcc-win32, supplied by Matthias Burian * Added support for MingW32, and CygnusW32 compilers * Added clipboard support for X11, Win32 and OS/2 ports * Added ability to get to the input file descriptor * New function for X11; Xinitscr() which allows standard X11 * switches to be passed to the application * Added X11 shared library support * * MH * 960920 2.3 Added more System V R4 functions * * Rewrote X11 port * * Added Win32 port - original port by Chris Szurgot * some updates by Mark Hessling * some updates by Gurusamy Sarathy * * slk() functions added by Kim Huron * * Support for more and newer versions of compilers * * Added mouse support for X11 and Win32 ports * * Size of chtype now long * * MH * 950126 2.2 Added more System V R4 functions * * Added beta Xwindows port * * Changed chtype to long * * Incorporated panels library * * Support for more and newer versions of compilers * * MH * 930531 2.1 Added support for djgpp * * Added beta Unix version * * Added OS/2 DLL support. * * Changed behaviour of overlay(), overwrite() and typeahead() * * 921120 2.0 Changed #if to #ifdef/#if defined to make it * easier to add new platforms/compilers. * * Added System V colour support. * * Added OS/2 port. *------- * Frotz * 911221 2.0 pre-beta Changed back from short to int. (int is the * correct size for the default platform. Short * might be too short on some platforms. This * is more portable. I, also, made this mistake.) * * Many functions are now macros. If you want * the real thing, #undef the macro. (X/Open * requirement.) * * Merged many sources into current release. * * Added many X/Open routines (not quite all yet). * * Added internal documentation to all routines. * * Added a HISTORY file to the environment. * * Added a CONTRIB file to the environment. *------- * bl 900114 1.4 Window origin mod in overlay() and overwrite(), on * public (and very reasonable) request. Swapped * #define'd values of OK and ERR; OK now 1, and * ERR is 0/NULL. Conforms better to UNIX * versions. borderchars[] removed from WINDOW * struct since the border() functions were * redefined. Use of short wherever possible. * Portability improvements, mispelled name of * [w]setscrreg(). * * 881005 1.3 All modules lint-checked with MSC '-W3' and * turbo'C' '-w -w-pro' switches. Support for * border(), wborder() functions. * * 881002 1.2 Rcsid[] string in all modules, for maintenance. * * 880306 1.1 'Raw' output routines, revision info in curses.h. * * 870515 1.0 Initial Release. * *---------------------------------------------------------------------- */ #if defined(__cplusplus) || defined(__cplusplus__) || defined(__CPLUSPLUS) extern "C" { # define bool _bool #endif #ifndef __PDCURSES__ #define __PDCURSES__ 1 /*man-start********************************************************************* All defines are "defined" here. All compiler and environment specific definitions are defined into generic class defines. These defines are to be given values so that the code can rely on #if, rather than a complicated set of #if defined() or #ifdefs... PDCurses definitions list: (Only define those needed) REGISTERWINDOWS True for auto window update registery. FAST_VIDEO True if display is memory mapped, or we can utilize the fast video update routines. DOS True if compiling for DOS. OS2 True if compiling for OS/2. WIN32 True if compiling for Windoze 95 or Windoze NT FLEXOS True if compiling for Flexos. HC True if using a Metaware compiler. TC True if using a Borland compiler. MSC True if using a Microsoft compiler. HAVE_PROTO True if the compiler supports ANSI prototypes. CPLUSPLUS True if the compiler supports C++. PDC_BUILD???? Defines API build version. PDCurses portable platform definitions list: PDCURSES Enables access to PDCurses-only routines. XOPEN Always true. SYSVcurses True if you are compiling for SYSV portability. BSDcurses True if you are compiling for BSD portability. PDCURSES_WCLR Makes behaviour of wclrtoeol() and wclrtoeof() unique to PDCurses. By default Unix behavior is set. See notes in wclrtoeol() and wclrtoeof(). **man-end**********************************************************************/ #define PDC_BUILD 2601 #define PDCURSES 1 /* PDCurses-only routines */ #define XOPEN 1 /* X/Open Curses routines */ #define SYSVcurses 1 /* System V Curses routines */ #define BSDcurses 1 /* BSD Curses routines */ #define CHTYPE_LONG 1 /* size of chtype; long */ #define PDC_CDECL /* default define this as empty */ /*---------------------------------------- * BORLAND COMPILERS Turbo C[++], Borland C[++] * * Borland definitions: * TC * DOS * OS2 * CPLUSPLUS * * __TURBOC__, __MSDOS__, * __OS2__ and __WIN32__ * are predefined by compiler. */ #ifdef __TURBOC__ /* Borland gives defines this as a value*/ # define TC __TURBOC__ /* Define a value for TC */ # ifndef HAVE_PROTO # define HAVE_PROTO 1 /* Borland supports ANSI C prototypes */ # endif # ifdef __MSDOS__ # define DOS 6 /* Major release of DOS supported */ # include # include # endif # ifdef __OS2__ # define OS2 3 /* Major release of OS/2 supported */ # define INCL_VIO # define INCL_KBD # include # endif # ifdef __WIN32__ # ifdef INCLUDE_WINDOWS_H /* only include for WIN32 files */ # include # ifdef MOUSE_MOVED /* get rid of Windows #define */ # undef MOUSE_MOVED # endif # endif # ifndef WIN32 # define WIN32 1 # endif # endif # if __TURBOC__ >= 0x290 # ifdef __BCPLUSPLUS__ # define CPLUSPLUS 1 /* Define that we are compiling C++. */ # endif # ifdef __TCPLUSPLUS__ # define CPLUSPLUS 1 /* Define that we are compiling C++. */ # endif # ifdef __CPLUSPLUS__ # define CPLUSPLUS 1 /* Define that we are compiling C++. */ # endif # endif # ifndef HAVE_LIMITS_H # define HAVE_LIMITS_H /* have */ # endif # ifndef HAVE_MEMORY_H # define HAVE_MEMORY_H /* have */ # endif # ifndef HAVE_STDARG_H # define HAVE_STDARG_H /* have */ # endif # ifndef HAVE_MEMMOVE # define HAVE_MEMMOVE /* have memmove() */ # endif # ifndef HAVE_VSSCANF # define HAVE_VSSCANF /* have vsscanf() */ # endif #endif /*---------------------------------------- * METAWARE COMPILERS High C * * Metaware definitions: * HC * DOS * FLEXOS */ #ifdef __HIGHC__ # define HC 1 # pragma off(prototype_override_warnings) # ifndef HAVE_PROTO # define HAVE_PROTO 1 /* Metaware supports ANSI C prototypes */ # endif # ifdef __MSDOS__ # define DOS 6 /* Major release of DOS supported */ # include # include # endif # ifdef __FLEXOS__ /* define this on the command line */ # define FLEXOS 2 /* or latest major release value. */ # endif #endif /*---------------------------------------- * MICROSOFT COMPILERS MSC * * Microsoft definitions: * MSC * DOS || OS2 */ #ifdef _MSC_VER /* defined by compiler */ # define MSC 1 # ifndef HAVE_PROTO # define HAVE_PROTO 1 /* Microsoft supports ANSI C prototypes */ # endif # ifdef __OS2__ /* You will have to define in makefile */ # define USE_OS2_H 1 /* Use the os2.h for the compiler */ # define OS2 3 /* Major release of OS/2 supported */ # define INCL_VIO # define INCL_KBD # include # define FARKeyword far # define APIRET USHORT # else /* no __OS2__ define, so assume DOS */ # ifdef _WIN32 # ifndef WIN32 # define WIN32 # endif # ifdef INCLUDE_WINDOWS_H /* only include for WIN32 files */ # include # ifdef MOUSE_MOVED /* get rid of Windows #define */ # undef MOUSE_MOVED # endif # endif # ifndef HAVE_MEMORY_H # define HAVE_MEMORY_H /* have */ # endif # ifndef HAVE_STDARG_H # define HAVE_STDARG_H /* have */ # endif # else # define DOS 6 /* Major release of DOS supported */ # include # include # undef HAVE_VSSCANF /* vsscanf() function NOT in library */ # endif # endif # ifndef HAVE_LIMITS_H # define HAVE_LIMITS_H /* have */ # endif # ifndef HAVE_MEMMOVE # define HAVE_MEMMOVE /* have memmove() */ # endif #endif /*---------------------------------------- * MICROSOFT QUICK C COMPILERS QC * */ #ifdef _QC /* defined by compiler */ # define MSC 1 # ifndef HAVE_PROTO # define HAVE_PROTO 1 /* QuickC supports ANSI C prototypes */ # endif # define DOS 6 /* Major release of DOS supported */ # include # include # undef HAVE_VSSCANF /* vsscanf() function NOT in library */ # ifndef HAVE_LIMITS_H # define HAVE_LIMITS_H /* have */ # endif #endif /*---------------------------------------- * TOPSPEED compilers TSC * * TOPSPEED definitions: * TSC * DOS || OS2 */ #ifdef __TSC__ /* You may have to define in makefile */ # define TSC 1 # ifndef HAVE_PROTO # define HAVE_PROTO 1 /* TopSpeed supports ANSI C prototypes */ # endif # ifdef __OS2__ # define OS2 3 /* Major release of OS/2 supported */ # define INCL_VIO # define INCL_KBD # include # endif # ifndef HAVE_LIMITS_H # define HAVE_LIMITS_H /* have */ # endif #endif /*---------------------------------------- * IBM C Set/2 Compiler CSET2 * * IBM definitions: * CSET2 * OS2 */ #ifdef __IBMC__ # define CSET2 1 # ifndef HAVE_PROTO # define HAVE_PROTO 1 /* C Set/2 supports ANSI C prototypes */ # endif # ifndef HAVE_STDARG_H # define HAVE_STDARG_H /* have */ # endif # ifndef HAVE_LIMITS_H # define HAVE_LIMITS_H /* have */ # endif # ifndef HAVE_MEMORY_H # define HAVE_MEMORY_H /* have */ # endif # ifndef HAVE_MEMMOVE # define HAVE_MEMMOVE /* have memmove() */ # endif # ifdef __OS2__ # define OS2 3 /* Major release of OS/2 supported */ # define INCL_VIO # define INCL_KBD # include # endif #endif /*---------------------------------------- * GNU compilers emx * * emx definitions: * EMX * OS2 */ #ifdef __EMX__ /* You may have to define in makefile */ # define EMX 1 # ifndef HAVE_PROTO # define HAVE_PROTO 1 /* emx supports ANSI C prototypes */ # endif # define __OS2__ /* EMX does not define this :-( */ # define OS2 3 /* Major release of OS/2 supported */ # define CURSES__32BIT__ # ifndef HAVE_STDARG_H # define HAVE_STDARG_H /* have */ # endif # ifndef HAVE_LIMITS_H # define HAVE_LIMITS_H /* have */ # endif # ifndef HAVE_MEMORY_H # define HAVE_MEMORY_H /* have */ # endif # ifndef HAVE_UNISTD_H # define HAVE_UNISTD_H /* have */ # endif # ifndef HAVE_MEMMOVE # define HAVE_MEMMOVE /* have memmove() */ # endif # ifndef HAVE_VSSCANF # define HAVE_VSSCANF /* have vsscanf() */ # endif # if defined(EMXVIDEO) # include # include # else # define INCL_VIO # define INCL_KBD # include # endif #endif /*---------------------------------------- * GNU compilers djgpp * * djgpp definitions: * GO32 * DOS */ #ifdef GO32 /* You may have to define in makefile */ # ifndef HAVE_PROTO # define HAVE_PROTO 1 /* DJGPP supports ANSI C prototypes */ # endif # define DOS 6 # include # ifdef __FLEXOS__ /* define this on the command line */ # define FLEXOS 2 /* or latest major release value. */ # endif # define CURSES__32BIT__ # ifdef _cplusplus # define CPLUSPLUS 1 # endif # ifndef HAVE_STDARG_H # define HAVE_STDARG_H /* have */ # endif # ifndef HAVE_LIMITS_H # define HAVE_LIMITS_H /* have */ # endif # ifndef HAVE_MEMORY_H # define HAVE_MEMORY_H /* have */ # endif # ifndef HAVE_UNISTD_H # define HAVE_UNISTD_H /* have */ # endif # ifndef HAVE_MEMMOVE # define HAVE_MEMMOVE /* have memmove() */ # endif # ifndef HAVE_USLEEP # define HAVE_USLEEP /* have usleep() */ # endif #endif /*---------------------------------------- * GNU compilers Cygnus Win32 * * cygnus definitions: * WIN32 */ #ifdef __CYGWIN32__ /* You may have to define in makefile */ # ifndef HAVE_PROTO # define HAVE_PROTO 1 /* Cygnuc GCC supports ANSI C prototypes */ # endif # ifdef INCLUDE_WINDOWS_H # include # ifdef MOUSE_MOVED # undef MOUSE_MOVED # endif # endif # ifndef WIN32 # define WIN32 # endif # ifndef INT_MAX # define INT_MAX 32762 # endif # define CURSES__32BIT__ # ifndef HAVE_LIMITS_H # define HAVE_LIMITS_H /* have */ # endif # ifndef HAVE_MEMORY_H # define HAVE_MEMORY_H /* have */ # endif # ifndef HAVE_STDARG_H # define HAVE_STDARG_H /* have */ # endif # ifndef HAVE_UNISTD_H # define HAVE_UNISTD_H /* have */ # endif # ifndef HAVE_MEMMOVE # define HAVE_MEMMOVE /* have memmove() */ # endif # ifndef HAVE_USLEEP # define HAVE_USLEEP /* have usleep() */ # endif #endif /*---------------------------------------- * GNU compilers Ming Win32 * * Ming definitions: * WIN32 */ #ifdef __MINGW32__ # ifndef HAVE_PROTO # define HAVE_PROTO 1 /* Ming GCC supports ANSI C prototypes */ # endif # ifdef INCLUDE_WINDOWS_H # include # ifdef MOUSE_MOVED # undef MOUSE_MOVED # endif # endif # ifndef WIN32 # define WIN32 # endif # define CURSES__32BIT__ # ifndef HAVE_LIMITS_H # define HAVE_LIMITS_H /* have */ # endif # ifndef HAVE_MEMORY_H # define HAVE_MEMORY_H /* have */ # endif # ifndef HAVE_STDARG_H # define HAVE_STDARG_H /* have */ # endif # ifndef HAVE_UNISTD_H # define HAVE_UNISTD_H /* have */ # endif # ifndef HAVE_MEMMOVE # define HAVE_MEMMOVE /* have memmove() */ # endif #endif /*---------------------------------------- * LCC WIN32 * */ #ifdef __LCC__ /* should already be defined by the compiler */ # ifndef HAVE_PROTO # define HAVE_PROTO 1 /* LCC-Win32 supports ANSI C prototypes */ # endif # ifdef INCLUDE_WINDOWS_H # include # ifdef MOUSE_MOVED # undef MOUSE_MOVED # endif # endif # ifndef WIN32 # define WIN32 # endif # ifndef INT_MAX # define INT_MAX 32762 # endif # ifndef HAVE_LIMITS_H # define HAVE_LIMITS_H /* have */ # endif # ifndef HAVE_MEMORY_H # define HAVE_MEMORY_H /* have */ # endif # ifndef HAVE_STDARG_H # define HAVE_STDARG_H /* have */ # endif # ifndef HAVE_MEMMOVE # define HAVE_MEMMOVE /* have memmove() */ # endif #endif /*---------------------------------------- * Watcom C/C++ 10.6 compiler * * WATCOM definitions: * WATCOMC * OS2 * WIN32 */ #ifdef __WATCOMC__ # define WATCOMC 1 # ifndef HAVE_PROTO # define HAVE_PROTO 1 /* Watcom C supports ANSI C prototypes */ # endif # define CURSES__32BIT__ # if defined( __DOS__ ) || defined( __DOS4G__ ) # define DOS 7 /* Major release of DOS supported */ # include # include # include # ifdef __386__ # define int86 int386 # define int86x int386x # endif # endif # if defined( __OS2__ ) || defined( __OS2V2__ ) # define OS2 3 /* Major release of OS/2 supported */ # define CURSES__32BIT__ # define INCL_VIO # define INCL_KBD # include # endif # ifdef __NT__ /* This specifies WIN32 target */ # ifdef INCLUDE_WINDOWS_H # include # ifdef MOUSE_MOVED # undef MOUSE_MOVED # endif # endif # ifndef WIN32 # define WIN32 # endif /* # ifdef PDC_CDECL # undef PDC_CDECL # define PDC_CDECL cdecl # endif */ # endif # ifndef HAVE_LIMITS_H # define HAVE_LIMITS_H /* have */ # endif # ifndef HAVE_MEMORY_H # define HAVE_MEMORY_H /* have */ # endif # ifndef HAVE_STDARG_H # define HAVE_STDARG_H /* have */ # endif # ifndef HAVE_MEMMOVE # define HAVE_MEMMOVE /* have memmove() */ # endif # ifndef HAVE_VSSCANF # define HAVE_VSSCANF /* have vsscanf() */ # endif #endif #if 0 /*---------------------------------------- * gcc under UNIX * * GNU definitions: * UNIX */ #ifdef UNIX # define HAVE_PROTO 1 /* GNU C supports ANSI C prototypes */ # ifdef SUNOS # define NO_VSSCANF # define NO_MEMMOVE # undef BSD # endif # ifdef linux # undef BSD # endif #endif #endif /*---------------------------------------- * MicroWay NDP C/C++ 386 4.2.0 compiler */ #ifdef MX386 # define HAVE_PROTO 1 # define NDP 1 # include # ifdef DOS # define MK_FP(seg,ofs) ( (((int) (seg)) << 4) + ((int) (ofs)) ) # ifdef __i860 typedef void _int; # else typedef int _int; # endif # endif # undef NO_VSSCANF /* vsscanf() function NOT in library */ # ifndef HAVE_LIMITS_H # define HAVE_LIMITS_H /* have */ # endif #endif /*---------------------------------------------------------------------*/ #include /* Required by X/Open usage below */ /*---------------------------------------------------------------------- * * PDCurses Manifest Constants * */ #ifndef FALSE /* booleans */ # define FALSE 0 #endif #ifndef TRUE /* booleans */ # define TRUE !FALSE #endif #ifndef NULL # define NULL 0 /* Null pointer */ #endif #ifndef ERR # define ERR 0 /* general error flag */ #endif #ifndef OK # define OK 1 /* general OK flag */ #endif /*---------------------------------------------------------------------- * * PDCurses Type Declarations * */ typedef unsigned char bool; /* PDCurses Boolean type */ #ifdef CHTYPE_LONG typedef unsigned long chtype; /* 16-bit attr + 16-bit char */ #else typedef unsigned short chtype; /* 8-bit attr + 8-bit char */ #endif /*---------------------------------------------------------------------- * This defines a new type for attributes. * */ typedef chtype attr_t; /*---------------------------------------------------------------------- * Define our mouse interface - same as SYSVR4 (with extensions) */ typedef struct { int x; /* absolute column, 0 based, measured in characters */ int y; /* absolute row, 0 based, measured in characters */ short button[3]; /* state of each button */ int changes; /* flags indicating what has changed with the mouse */ } MOUSE_STATUS; #define BUTTON_RELEASED 0000 #define BUTTON_PRESSED 0001 #define BUTTON_CLICKED 0002 #define BUTTON_DOUBLE_CLICKED 0003 #define BUTTON_TRIPLE_CLICKED 0004 #define BUTTON_MOVED 0005 /* PDCurses enhancement */ #define BUTTON_ACTION_MASK 0007 /* PDCurses enhancement */ #define BUTTON_SHIFT 0010 /* PDCurses enhancement */ #define BUTTON_CONTROL 0020 /* PDCurses enhancement */ #define BUTTON_ALT 0040 /* PDCurses enhancement */ #define BUTTON_MODIFIER_MASK 0070 /* PDCurses enhancement */ #define MOUSE_X_POS (Mouse_status.x) #define MOUSE_Y_POS (Mouse_status.y) #define A_BUTTON_CHANGED (Mouse_status.changes & 7) #define MOUSE_MOVED (Mouse_status.changes & 8) #define MOUSE_POS_REPORT (Mouse_status.changes & 16) #define BUTTON_CHANGED(x) (Mouse_status.changes & (1 << ((x) - 1))) #define BUTTON_STATUS(x) (Mouse_status.button[(x)-1]) /* mouse bit-masks */ #define BUTTON1_RELEASED 000000000001L #define BUTTON1_PRESSED 000000000002L #define BUTTON1_CLICKED 000000000004L #define BUTTON1_DOUBLE_CLICKED 000000000010L #define BUTTON1_TRIPLE_CLICKED 000000000020L #define BUTTON1_MOVED 000000000020L /* PDCurses enhancement */ #define BUTTON2_RELEASED 000000000040L #define BUTTON2_PRESSED 000000000100L #define BUTTON2_CLICKED 000000000200L #define BUTTON2_DOUBLE_CLICKED 000000000400L #define BUTTON2_TRIPLE_CLICKED 000000001000L #define BUTTON2_MOVED 000000001000L /* PDCurses enhancement */ #define BUTTON3_RELEASED 000000002000L #define BUTTON3_PRESSED 000000004000L #define BUTTON3_CLICKED 000000010000L #define BUTTON3_DOUBLE_CLICKED 000000020000L #define BUTTON3_TRIPLE_CLICKED 000000040000L #define BUTTON3_MOVED 000000040000L /* PDCurses enhancement */ #define BUTTON_MODIFIER_SHIFT 000000100000L /* PDCurses enhancement */ #define BUTTON_MODIFIER_CONTROL 000000200000L /* PDCurses enhancement */ #define BUTTON_MODIFIER_ALT 000000400000L /* PDCurses enhancement */ #define ALL_MOUSE_EVENTS 000000777777L #define REPORT_MOUSE_POSITION 000001000000L /*---------------------------------------------------------------------- * * PDCurses Structure Definitions: * */ typedef struct _win /* definition of a window. */ { int _cury; /* current pseudo-cursor */ int _curx; int _maxy; /* max window coordinates */ int _maxx; int _pmaxy; /* max physical size */ int _pmaxx; int _begy; /* origin on screen */ int _begx; int _lastpy; /* last y coordinate of upper left pad display area */ int _lastpx; /* last x coordinate of upper left pad display area */ int _lastsy1; /* last upper y coordinate of screen window for pad */ int _lastsx1; /* last upper x coordinate of screen window for pad */ int _lastsy2; /* last lower y coordinate of screen window for pad */ int _lastsx2; /* last lower x coordinate of screen window for pad */ int _flags; /* window properties */ attr_t _attrs; /* standard A_STANDOUT attributes and colors */ chtype _bkgd; /* wrs(4/6/93) background, normally blank */ int _tabsize; /* tab character size */ bool _clear; /* causes clear at next refresh */ bool _leaveit; /* leaves cursor where it is */ bool _scroll; /* allows window scrolling */ bool _nodelay; /* input character wait flag */ bool _immed; /* immediate update flag */ bool _sync; /* synchronise window ancestors */ bool _use_keypad; /* flags keypad key mode active */ bool _use_idl; /* True if Ins/Del line can be used*/ bool _use_idc; /* True if Ins/Del character can be used*/ chtype**_y; /* pointer to line pointer array */ int* _firstch; /* first changed character in line */ int* _lastch; /* last changed character in line */ int _tmarg; /* top of scrolling region */ int _bmarg; /* bottom of scrolling region */ char* _title; /* window title */ char _title_ofs; /* window title offset from left */ attr_t _title_attr; /* window title attributes */ chtype _blank; /* window's blank character */ int _parx, _pary; /* coords relative to parent (0,0) */ struct _win* _parent; /* subwin's pointer to parent win */ } WINDOW; /*---------------------------------------------------------------------- * * Private structures that are necessary for correct * macro construction. * */ #ifdef REGISTERWINDOWS typedef struct _ref /* Refresh Window Structure */ { WINDOW* win; struct _ref* next; struct _ref* tail; } ACTIVE; typedef struct _wins { WINDOW* w; /* pointer to a visible window */ struct _wins* next; /* Next visible window pointer */ struct _wins* prev; /* Next visible window pointer */ struct _wins* tail; /* Last visible window pointer */ /* Only head window (stdscr) has */ /* a valid tail pointer. */ } WINDS; #endif typedef struct /* structure for ripped off lines */ { int line; int (*init)(); } RIPPEDOFFLINE; typedef struct { bool alive; /* if initscr() called */ bool autocr; /* if lf -> crlf */ bool cbreak; /* if terminal unbuffered */ bool echo; /* if terminal echo */ bool raw_inp; /* raw input mode (v. cooked input) */ bool raw_out; /* raw output mode (7 v. 8 bits) */ bool refrbrk; /* if premature refresh brk allowed */ bool orgcbr; /* original MSDOS ^-BREAK setting */ bool visible_cursor; /* TRUE if cursor is visible */ bool audible; /* FALSE if the bell is visual */ bool full_redraw; /* TRUE for bad performance */ bool direct_video; /* Allow Direct Screen Memory writes*/ bool mono; /* TRUE if current screen is mono. */ bool sizeable; /* TRUE if adapter is resizeable. */ bool resized; /* TRUE if TERM has been resized */ bool bogus_adapter; /* TRUE if adapter has insane values*/ bool shell; /* TRUE if reset_prog_mode() needs */ /* to be called. */ chtype blank; /* Background character */ attr_t orig_attr; /* Original screen attributes */ int cursrow; /* position of physical cursor */ int curscol; /* position of physical cursor */ int cursor; /* Current Cursor definition */ int visibility; /* Visibility of cursor */ int video_page; /* Current PC video page */ int orig_emulation; /* Original cursor emulation value */ int orig_cursor; /* Original cursor size */ int font; /* default font size */ int orig_font; /* Original font size */ int lines; /* New value for LINES */ int cols; /* New value for COLS */ unsigned long _trap_mbe; /* trap these mouse button events */ unsigned long _map_mbe_to_key; /* map mouse buttons to slk */ int slklines; /* Lines in use by slk_init() */ WINDOW * slk_winptr; /* window for slk */ int linesrippedoff; /* Lines ripped off via ripoffline() */ int linesrippedoffontop; /* Lines ripped off on top via ripoffline() */ int delaytenths; /* 1/10ths second to wait block getch() for */ bool _preserve; /* TRUE if screen background to be preserved */ bool _restore; /* TRUE if screen background to be restored */ bool save_key_modifiers; /* TRUE if each key modifiers saved with each key press */ bool return_key_modifiers; /* TRUE if modifier keys are returned as "real" keys */ #ifdef OS2 # ifdef EMXVIDEO /* nop if using EMX builtins */ int tahead; /* Type-ahead value */ int adapter; /* Screen type */ # else VIOMODEINFO scrnmode; /* default screen mode */ VIOCONFIGINFO adapter; /* Screen type */ KBDINFO kbdinfo; /* keyboard info */ # endif #else int adapter; /* Screen type */ #endif #if defined(DOS) || defined(WIN32) int scrnmode; /* default screen mode */ unsigned video_seg; /* video base segment */ unsigned video_ofs; /* video base offset */ #endif #if defined(OS2) || defined(WIN32) int num_mouse_buttons; /* number of mouse buttons */ #endif #if defined (XCURSES) int XcurscrSize; /* size of Xcurscr shared memory block */ bool sb_on; int sb_viewport_y; int sb_viewport_x; int sb_total_y; int sb_total_x; int sb_cur_y; int sb_cur_x; #endif #ifdef REGISTERWINDOWS WINDS* visible; /* List of visible windows */ bool refreshall; /* Refresh all registered windows? */ #endif short line_color; /* Color of line attributes - default white */ } SCREEN; /* external variables */ #if !defined(PDC_STATIC_BUILD) && defined(_MSC_VER) && defined(WIN32) && !defined(CURSES_LIBRARY) __declspec(dllimport) int LINES; /* terminal height */ __declspec(dllimport) int COLS; /* terminal width */ __declspec(dllimport) WINDOW* stdscr; /* the default screen window */ __declspec(dllimport) WINDOW* curscr; /* the current screen image */ __declspec(dllimport) SCREEN *SP; /* curses variables */ __declspec(dllimport) int use_emalloc; /* set to true to use your own malloc,etc */ __declspec(dllimport) MOUSE_STATUS Mouse_status; __declspec(dllimport) int COLORS; __declspec(dllimport) int COLOR_PAIRS; #else # if !defined(PDC_STATIC_BUILD) && defined(_MSC_VER) && defined(WIN32) __declspec(dllexport) extern int LINES; /* terminal height */ __declspec(dllexport) extern int COLS; /* terminal width */ __declspec(dllexport) extern WINDOW* stdscr; /* the default screen window */ __declspec(dllexport) extern WINDOW* curscr; /* the current screen image */ __declspec(dllexport) extern SCREEN *SP; /* curses variables */ __declspec(dllexport) extern int use_emalloc; /* set to true to use your own malloc,etc */ __declspec(dllexport) extern MOUSE_STATUS Mouse_status; __declspec(dllexport) extern int COLORS; __declspec(dllexport) extern int COLOR_PAIRS; # else extern int LINES; /* terminal height */ extern int COLS; /* terminal width */ extern WINDOW* stdscr; /* the default screen window */ extern WINDOW* curscr; /* the current screen image */ extern SCREEN *SP; /* curses variables */ extern int use_emalloc; /* set to true to use your own malloc,etc */ extern MOUSE_STATUS Mouse_status; extern int COLORS,COLOR_PAIRS; # endif #endif #if defined (CURSES_LIBRARY) extern int _default_lines; /* For presetting maximum lines */ #endif #ifdef REGISTERWINDOWS extern ACTIVE* CurWins; /* Currently Visible Windows */ #endif /*man-start********************************************************************* PDCurses Text Attributes: To include colour in PDCurses, a number of things had to be sacrificed from the strict Unix and System V support. The main problem is fitting all character attributes and colour into an unsigned char (all 8 bits!). On System V, chtype is a long on PDCurses it is a short int. The following is the structure of a win->_attrs chtype: ------------------------------------------------------------------------------------------------- |31|30|29|28|27|26|25|24|23|22|21|20|19|18|17|16|15|14|13|12|11|10| 9| 8| 7| 6| 5| 4| 3| 2| 1| 0| ------------------------------------------------------------------------------------------------- colour number | modifiers | character eg 'a' (potential for DBCS) The available attribute modifiers are bold, underline, invisible, protect, reverse and blink. **man-end**********************************************************************/ /* Video attribute definitions. */ #ifdef CHTYPE_LONG # define A_NORMAL 0x00000000L # define A_UNDERLINE 0x00100000L # define A_REVERSE 0x00200000L # define A_BLINK 0x00400000L # define A_BOLD 0x00800000L # define A_RIGHTLINE 0x00010000L # define A_DIM 0x00020000L # define A_ALTCHARSET 0x00040000L # define A_INVIS 0x00080000L # define A_ATTRIBUTES 0xFFFF0000L # define A_CHARTEXT 0x0000FFFFL # define A_COLOR 0xFF000000L # define A_LEFTLINE A_DIM # define A_ITALIC A_INVIS # define A_STANDOUT ( A_BOLD | A_REVERSE ) # define A_PROTECT ( A_UNDERLINE | A_LEFTLINE | A_RIGHTLINE ) #else # define A_NORMAL (chtype)0x0000 /* System V */ # define A_ALTCHARSET (chtype)0x0000 /* X/Open */ # define A_BLINK (chtype)0x0400 /* X/Open */ # define A_BLANK (chtype)0x0000 /* X/Open */ # define A_BOLD (chtype)0x0100 /* X/Open */ # define A_DIM (chtype)0x0000 /* X/Open */ # define A_PROTECT (chtype)0x0000 /* X/Open */ # define A_REVERSE (chtype)0x0200 /* X/Open */ # define A_STANDOUT ((chtype)(A_REVERSE | A_BOLD)) /* X/Open */ # define A_UNDERLINE (chtype)0x0000 /* X/Open */ # define A_COLOR (chtype)0xF800 /* System V */ # define A_CHARTEXT (chtype)(0xFF) /* X/Open */ # define A_ATTRIBUTES (chtype)(~A_CHARTEXT) /* X/Open */ #endif #define CHR_MSK A_CHARTEXT /* Obsolete */ #define ATR_MSK A_ATTRIBUTES /* Obsolete */ #define ATR_NRM A_NORMAL /* Obsolete */ #ifdef XCURSES extern chtype *acs_map; # define ACS_BSSB (acs_map['l']) # define ACS_SSBB (acs_map['m']) # define ACS_BBSS (acs_map['k']) # define ACS_SBBS (acs_map['j']) # define ACS_SBSS (acs_map['u']) # define ACS_SSSB (acs_map['t']) # define ACS_SSBS (acs_map['v']) # define ACS_BSSS (acs_map['w']) # define ACS_BSBS (acs_map['q']) # define ACS_SBSB (acs_map['x']) # define ACS_SSSS (acs_map['n']) # define ACS_ULCORNER ACS_BSSB # define ACS_LLCORNER ACS_SSBB # define ACS_URCORNER ACS_BBSS # define ACS_LRCORNER ACS_SBBS # define ACS_RTEE ACS_SBSS # define ACS_LTEE ACS_SSSB # define ACS_BTEE ACS_SSBS # define ACS_TTEE ACS_BSSS # define ACS_HLINE ACS_BSBS # define ACS_VLINE ACS_SBSB # define ACS_PLUS ACS_SSSS # define ACS_S1 (acs_map['o']) # define ACS_S9 (acs_map['s']) # define ACS_DIAMOND (acs_map['\'']) # define ACS_CKBOARD (acs_map['a']) # define ACS_DEGREE (acs_map['f']) # define ACS_PLMINUS (acs_map['g']) # define ACS_BULLET (acs_map['~']) # define ACS_LARROW (acs_map[',']) # define ACS_RARROW (acs_map['+']) # define ACS_DARROW (acs_map['.']) # define ACS_UARROW (acs_map['-']) # define ACS_BOARD (acs_map['h']) # define ACS_LANTERN (acs_map['i']) # define ACS_BLOCK (acs_map['0']) # define ACS_S3 (acs_map['p']) # define ACS_S7 (acs_map['r']) # define ACS_LEQUAL (acs_map['y']) # define ACS_GEQUAL (acs_map['z']) # define ACS_PI (acs_map['{']) # define ACS_NEQUAL (acs_map['|']) # define ACS_STERLING (acs_map['}']) #endif #if defined(DOS) || defined(OS2) || defined(WIN32) /* ALTCHARSET definitions from jshumate@wrdis01.robins.af.mil */ # define ACS_ULCORNER (chtype)0xda /* SysV */ # define ACS_LLCORNER (chtype)0xc0 /* SysV */ # define ACS_URCORNER (chtype)0xbf /* SysV */ # define ACS_LRCORNER (chtype)0xd9 /* SysV */ # define ACS_RTEE (chtype)0xb4 /* SysV */ # define ACS_LTEE (chtype)0xc3 /* SysV */ # define ACS_BTEE (chtype)0xc1 /* SysV */ # define ACS_TTEE (chtype)0xc2 /* SysV */ # define ACS_HLINE (chtype)0xc4 /* SysV */ # define ACS_VLINE (chtype)0xb3 /* SysV */ # define ACS_PLUS (chtype)0xc5 /* SysV */ # define ACS_S1 (chtype)0x2d /* SysV */ # define ACS_S9 (chtype)0x5f /* SysV */ # define ACS_DIAMOND (chtype)0xc5 /* SysV */ # define ACS_CKBOARD (chtype)0xb2 /* SysV */ # define ACS_DEGREE (chtype)0xf8 /* SysV */ # define ACS_PLMINUS (chtype)0xf1 /* SysV */ # define ACS_BULLET (chtype)0xf9 /* SysV */ # define ACS_LARROW (chtype)0x3c /* SysV */ # define ACS_RARROW (chtype)0x3e /* SysV */ # define ACS_DARROW (chtype)0x76 /* SysV */ # define ACS_UARROW (chtype)0x5e /* SysV */ # define ACS_BOARD (chtype)0x23 /* SysV */ # define ACS_LANTERN (chtype)0x23 /* SysV */ # define ACS_BLOCK (chtype)0x23 /* SysV */ /* the following definitions can be used if you have set raw_output() or are using the PDCurses *raw*() functions */ # if 0 # define ACS_DIAMOND (chtype)0x04 /* SysV */ # define ACS_LARROW (chtype)0x1b /* SysV */ # define ACS_RARROW (chtype)0x1a /* SysV */ # define ACS_DARROW (chtype)0x19 /* SysV */ # define ACS_UARROW (chtype)0x18 /* SysV */ # define ACS_BOARD (chtype)0xb0 /* SysV */ # define ACS_LANTERN (chtype)0x0f /* SysV */ # define ACS_BLOCK (chtype)0xdb /* SysV */ # endif #endif /* colour attributes */ #if defined (XCURSES) # define COLOR_BLACK 0 # define COLOR_RED 1 # define COLOR_GREEN 2 # define COLOR_YELLOW 3 # define COLOR_BLUE 4 # define COLOR_MAGENTA 5 # define COLOR_CYAN 6 # define COLOR_WHITE 7 #endif #if defined(DOS) || defined(OS2) # define COLOR_BLACK 0 # define COLOR_BLUE 1 # define COLOR_GREEN 2 # define COLOR_CYAN 3 # define COLOR_RED 4 # define COLOR_MAGENTA 5 # define COLOR_YELLOW 6 # define COLOR_WHITE 7 #endif #if defined(WIN32) # define MS_MOUSE_MOVED 0x0001 /* * These defines taken directly from windows.h to reduce * compilation time by only #include'ing * when absolutely necesssary. Cygnus-W32 #defines all of these * so we need to check for that. */ # ifndef FOREGROUND_BLUE # define FOREGROUND_BLUE 0x0001 # endif # ifndef FOREGROUND_GREEN # define FOREGROUND_GREEN 0x0002 # endif # ifndef FOREGROUND_RED # define FOREGROUND_RED 0x0004 # endif # ifndef FOREGROUND_INTENSITY # define FOREGROUND_INTENSITY 0x0008 /* BOLD */ # endif # ifndef BACKGROUND_BLUE # define BACKGROUND_BLUE 0x0010 # endif # ifndef BACKGROUND_GREEN # define BACKGROUND_GREEN 0x0020 # endif # ifndef BACKGROUND_RED # define BACKGROUND_RED 0x0040 # endif # ifndef BACKGROUND_INTENSITY # define BACKGROUND_INTENSITY 0x0080 /* BLINK */ # endif # define COLOR_BLACK 0 # define COLOR_BLUE FOREGROUND_BLUE # define COLOR_RED FOREGROUND_RED # define COLOR_GREEN FOREGROUND_GREEN # define COLOR_CYAN FOREGROUND_BLUE | FOREGROUND_GREEN # define COLOR_MAGENTA FOREGROUND_RED | FOREGROUND_BLUE # define COLOR_YELLOW FOREGROUND_RED | FOREGROUND_GREEN # define COLOR_WHITE FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE #endif #ifdef CHTYPE_LONG #define COLOR_PAIR(n) ((chtype)(n) << 24) #define PAIR_NUMBER(n) (((n) & A_COLOR) >> 24) #else #define COLOR_PAIR(n) (((n) << 11) & A_ATTRIBUTES) #define PAIR_NUMBER(n) (((n) & A_COLOR) >> 11) #endif /*---------------------------------------------------------------------- * * Function and Keypad Key Definitions. * Many are just for compatibility. * */ #define KEY_MIN 0x101 /* Minimum curses key value */ #define KEY_BREAK 0x101 /* Not on PC KBD */ #define KEY_DOWN 0x102 /* Down arrow key */ #define KEY_UP 0x103 /* Up arrow key */ #define KEY_LEFT 0x104 /* Left arrow key */ #define KEY_RIGHT 0x105 /* Right arrow key */ #define KEY_HOME 0x106 /* home key */ #define KEY_BACKSPACE 0x107 /* not on pc */ #define KEY_F0 0x108 /* function keys. space for */ #define KEY_F(n) (KEY_F0+(n))/* 64 keys are reserved. */ #define KEY_DL 0x148 /* delete line */ #define KEY_IL 0x149 /* insert line */ #define KEY_DC 0x14a /* delete character */ #define KEY_IC 0x14b /* insert char or enter ins mode */ #define KEY_EIC 0x14c /* exit insert char mode */ #define KEY_CLEAR 0x14d /* clear screen */ #define KEY_EOS 0x14e /* clear to end of screen */ #define KEY_EOL 0x14f /* clear to end of line */ #define KEY_SF 0x150 /* scroll 1 line forward */ #define KEY_SR 0x151 /* scroll 1 line back (reverse) */ #define KEY_NPAGE 0x152 /* next page */ #define KEY_PPAGE 0x153 /* previous page */ #define KEY_STAB 0x154 /* set tab */ #define KEY_CTAB 0x155 /* clear tab */ #define KEY_CATAB 0x156 /* clear all tabs */ #define KEY_ENTER 0x157 /* enter or send (unreliable) */ #define KEY_SRESET 0x158 /* soft/reset (partial/unreliable)*/ #define KEY_RESET 0x159 /* reset/hard reset (unreliable) */ #define KEY_PRINT 0x15a /* print/copy */ #define KEY_LL 0x15b /* home down/bottom (lower left) */ #define KEY_ABORT 0x15c /* abort/terminate key (any) */ #define KEY_SHELP 0x15d /* short help */ #define KEY_LHELP 0x15e /* long help */ #define KEY_BTAB 0x15f /* Back tab key */ #define KEY_BEG 0x160 /* beg(inning) key */ #define KEY_CANCEL 0x161 /* cancel key */ #define KEY_CLOSE 0x162 /* close key */ #define KEY_COMMAND 0x163 /* cmd (command) key */ #define KEY_COPY 0x164 /* copy key */ #define KEY_CREATE 0x165 /* create key */ #define KEY_END 0x166 /* end key */ #define KEY_EXIT 0x167 /* exit key */ #define KEY_FIND 0x168 /* find key */ #define KEY_HELP 0x169 /* help key */ #define KEY_MARK 0x16a /* mark key */ #define KEY_MESSAGE 0x16b /* message key */ #define KEY_MOVE 0x16c /* move key */ #define KEY_NEXT 0x16d /* next object key */ #define KEY_OPEN 0x16e /* open key */ #define KEY_OPTIONS 0x16f /* options key */ #define KEY_PREVIOUS 0x170 /* previous object key */ #define KEY_REDO 0x171 /* redo key */ #define KEY_REFERENCE 0x172 /* ref(erence) key */ #define KEY_REFRESH 0x173 /* refresh key */ #define KEY_REPLACE 0x174 /* replace key */ #define KEY_RESTART 0x175 /* restart key */ #define KEY_RESUME 0x176 /* resume key */ #define KEY_SAVE 0x177 /* save key */ #define KEY_SBEG 0x178 /* shifted beginning key */ #define KEY_SCANCEL 0x179 /* shifted cancel key */ #define KEY_SCOMMAND 0x17a /* shifted command key */ #define KEY_SCOPY 0x17b /* shifted copy key */ #define KEY_SCREATE 0x17c /* shifted create key */ #define KEY_SDC 0x17d /* shifted delete char key */ #define KEY_SDL 0x17e /* shifted delete line key */ #define KEY_SELECT 0x17f /* select key */ #define KEY_SEND 0x180 /* shifted end key */ #define KEY_SEOL 0x181 /* shifted clear line key */ #define KEY_SEXIT 0x182 /* shifted exit key */ #define KEY_SFIND 0x183 /* shifted find key */ #define KEY_SHOME 0x184 /* shifted home key */ #define KEY_SIC 0x185 /* shifted input key */ #define KEY_SLEFT 0x187 /* shifted left arrow key */ #define KEY_SMESSAGE 0x188 /* shifted message key */ #define KEY_SMOVE 0x189 /* shifted move key */ #define KEY_SNEXT 0x18a /* shifted next key */ #define KEY_SOPTIONS 0x18b /* shifted options key */ #define KEY_SPREVIOUS 0x18c /* shifted prev key */ #define KEY_SPRINT 0x18d /* shifted print key */ #define KEY_SREDO 0x18e /* shifted redo key */ #define KEY_SREPLACE 0x18f /* shifted replace key */ #define KEY_SRIGHT 0x190 /* shifted right arrow */ #define KEY_SRSUME 0x191 /* shifted resume key */ #define KEY_SSAVE 0x192 /* shifted save key */ #define KEY_SSUSPEND 0x193 /* shifted suspend key */ #define KEY_SUNDO 0x194 /* shifted undo key */ #define KEY_SUSPEND 0x195 /* suspend key */ #define KEY_UNDO 0x196 /* undo key */ /* PDCurses specific key definitions */ #define ALT_0 0x197 /* Alt-0 PC only */ #define ALT_1 0x198 /* Alt-1 PC only */ #define ALT_2 0x199 /* Alt-2 PC only */ #define ALT_3 0x19a /* Alt-3 PC only */ #define ALT_4 0x19b /* Alt-4 PC only */ #define ALT_5 0x19c /* Alt-5 PC only */ #define ALT_6 0x19d /* Alt-6 PC only */ #define ALT_7 0x19e /* Alt-7 PC only */ #define ALT_8 0x19f /* Alt-8 PC only */ #define ALT_9 0x1a0 /* Alt-9 PC only */ #define ALT_A 0x1a1 /* Alt-A PC only */ #define ALT_B 0x1a2 /* Alt-B PC only */ #define ALT_C 0x1a3 /* Alt-C PC only */ #define ALT_D 0x1a4 /* Alt-D PC only */ #define ALT_E 0x1a5 /* Alt-E PC only */ #define ALT_F 0x1a6 /* Alt-F PC only */ #define ALT_G 0x1a7 /* Alt-G PC only */ #define ALT_H 0x1a8 /* Alt-H PC only */ #define ALT_I 0x1a9 /* Alt-I PC only */ #define ALT_J 0x1aa /* Alt-J PC only */ #define ALT_K 0x1ab /* Alt-K PC only */ #define ALT_L 0x1ac /* Alt-L PC only */ #define ALT_M 0x1ad /* Alt-M PC only */ #define ALT_N 0x1ae /* Alt-N PC only */ #define ALT_O 0x1af /* Alt-O PC only */ #define ALT_P 0x1b0 /* Alt-P PC only */ #define ALT_Q 0x1b1 /* Alt-Q PC only */ #define ALT_R 0x1b2 /* Alt-R PC only */ #define ALT_S 0x1b3 /* Alt-S PC only */ #define ALT_T 0x1b4 /* Alt-T PC only */ #define ALT_U 0x1b5 /* Alt-U PC only */ #define ALT_V 0x1b6 /* Alt-V PC only */ #define ALT_W 0x1b7 /* Alt-W PC only */ #define ALT_X 0x1b8 /* Alt-X PC only */ #define ALT_Y 0x1b9 /* Alt-Y PC only */ #define ALT_Z 0x1ba /* Alt-Z PC only */ #define CTL_LEFT 0x1bb /* Control-Left-Arrow PC only */ #define CTL_RIGHT 0x1bc /* Control-Right-Arrow PC only */ #define CTL_PGUP 0x1bd /* Control-PgUp PC only */ #define CTL_PGDN 0x1be /* Control-PgDn PC only */ #define CTL_HOME 0x1bf /* Control-Home PC only */ #define CTL_END 0x1c0 /* Control-End PC only */ #if defined(FLEXOS) # define KEY_MOUSE 0x1c1 /* "mouse" key */ # define KEY_A1 KEY_HOME/* upper left on Virtual keypad */ # define KEY_A2 KEY_UP /* upper middle on Virt. keypad */ # define KEY_A3 KEY_PPAGE/* upper right on Vir. keypad */ # define KEY_B1 KEY_LEFT/* middle left on Virt. keypad */ # define KEY_B2 0x00 /* center on Virt. keypad */ # define KEY_B3 KEY_RIGHT/* middle right on Vir. keypad */ # define KEY_C1 KEY_LL /* lower left on Virt. keypad */ # define KEY_C2 KEY_DOWN /* lower middle on Virt. keypad */ # define KEY_C3 KEY_NPAGE /* lower right on Vir. keypad */ # define KEY_MAX KEY_MOUSE /* Maximum curses key */ #endif #if defined(DOS) || defined (OS2) || defined(XCURSES) || defined(WIN32) # define KEY_A1 0x1c1 /* upper left on Virtual keypad */ # define KEY_A2 0x1c2 /* upper middle on Virt. keypad */ # define KEY_A3 0x1c3 /* upper right on Vir. keypad */ # define KEY_B1 0x1c4 /* middle left on Virt. keypad */ # define KEY_B2 0x1c5 /* center on Virt. keypad */ # define KEY_B3 0x1c6 /* middle right on Vir. keypad */ # define KEY_C1 0x1c7 /* lower left on Virt. keypad */ # define KEY_C2 0x1c8 /* lower middle on Virt. keypad */ # define KEY_C3 0x1c9 /* lower right on Vir. keypad */ # define PADSLASH 0x1ca /* slash on keypad */ # define PADENTER 0x1cb /* enter on keypad */ # define CTL_PADENTER 0x1cc /* ctl-enter on keypad */ # define ALT_PADENTER 0x1cd /* alt-enter on keypad */ # define PADSTOP 0x1ce /* stop on keypad */ # define PADSTAR 0x1cf /* star on keypad */ # define PADMINUS 0x1d0 /* minus on keypad */ # define PADPLUS 0x1d1 /* plus on keypad */ # define CTL_PADSTOP 0x1d2 /* ctl-stop on keypad */ # define CTL_PADCENTER 0x1d3 /* ctl-enter on keypad */ # define CTL_PADPLUS 0x1d4 /* ctl-plus on keypad */ # define CTL_PADMINUS 0x1d5 /* ctl-minus on keypad */ # define CTL_PADSLASH 0x1d6 /* ctl-slash on keypad */ # define CTL_PADSTAR 0x1d7 /* ctl-star on keypad */ # define ALT_PADPLUS 0x1d8 /* alt-plus on keypad */ # define ALT_PADMINUS 0x1d9 /* alt-minus on keypad */ # define ALT_PADSLASH 0x1da /* alt-slash on keypad */ # define ALT_PADSTAR 0x1db /* alt-star on keypad */ # define ALT_PADSTOP 0x1dc /* alt-stop on keypad */ # define CTL_INS 0x1dd /* ctl-insert */ # define ALT_DEL 0x1de /* alt-delete */ # define ALT_INS 0x1df /* alt-insert */ # define CTL_UP 0x1e0 /* ctl-up arrow */ # define CTL_DOWN 0x1e1 /* ctl-down arrow */ # define CTL_TAB 0x1e2 /* ctl-tab */ # define ALT_TAB 0x1e3 /* alt-tab */ # define ALT_MINUS 0x1e4 /* alt-minus */ # define ALT_EQUAL 0x1e5 /* alt-equal */ # define ALT_HOME 0x1e6 /* alt-home */ # define ALT_PGUP 0x1e7 /* alt-pgup */ # define ALT_PGDN 0x1e8 /* alt-pgdn */ # define ALT_END 0x1e9 /* alt-end */ # define ALT_UP 0x1ea /* alt-up arrow */ # define ALT_DOWN 0x1eb /* alt-down arrow */ # define ALT_RIGHT 0x1ec /* alt-right arrow */ # define ALT_LEFT 0x1ed /* alt-left arrow */ # define ALT_ENTER 0x1ee /* alt-enter */ # define ALT_ESC 0x1ef /* alt-escape */ # define ALT_BQUOTE 0x1f0 /* alt-back quote */ # define ALT_LBRACKET 0x1f1 /* alt-left bracket */ # define ALT_RBRACKET 0x1f2 /* alt-right bracket */ # define ALT_SEMICOLON 0x1f3 /* alt-semi-colon */ # define ALT_FQUOTE 0x1f4 /* alt-forward quote */ # define ALT_COMMA 0x1f5 /* alt-comma */ # define ALT_STOP 0x1f6 /* alt-stop */ # define ALT_FSLASH 0x1f7 /* alt-forward slash */ # define ALT_BKSP 0x1f8 /* alt-backspace */ # define CTL_BKSP 0x1f9 /* ctl-backspace */ # define PAD0 0x1fa /* ctl-keypad 0 */ # define CTL_PAD0 0x1fb /* ctl-keypad 0 */ # define CTL_PAD1 0x1fc /* ctl-keypad 1 */ # define CTL_PAD2 0x1fd /* ctl-keypad 2 */ # define CTL_PAD3 0x1fe /* ctl-keypad 3 */ # define CTL_PAD4 0x1ff /* ctl-keypad 4 */ # define CTL_PAD5 0x200 /* ctl-keypad 5 */ # define CTL_PAD6 0x201 /* ctl-keypad 6 */ # define CTL_PAD7 0x202 /* ctl-keypad 7 */ # define CTL_PAD8 0x203 /* ctl-keypad 8 */ # define CTL_PAD9 0x204 /* ctl-keypad 9 */ # define ALT_PAD0 0x205 /* ctl-keypad 0 */ # define ALT_PAD1 0x206 /* ctl-keypad 1 */ # define ALT_PAD2 0x207 /* ctl-keypad 2 */ # define ALT_PAD3 0x208 /* ctl-keypad 3 */ # define ALT_PAD4 0x209 /* ctl-keypad 4 */ # define ALT_PAD5 0x20a /* ctl-keypad 5 */ # define ALT_PAD6 0x20b /* ctl-keypad 6 */ # define ALT_PAD7 0x20c /* ctl-keypad 7 */ # define ALT_PAD8 0x20d /* ctl-keypad 8 */ # define ALT_PAD9 0x20e /* ctl-keypad 9 */ # define CTL_DEL 0x20f /* clt-delete */ # define ALT_BSLASH 0x210 /* alt-back slash */ # define CTL_ENTER 0x211 /* ctl-enter */ # define SHF_PADENTER 0x212 /* shift-enter on keypad */ # define SHF_PADSLASH 0x213 /* shift-slash on keypad */ # define SHF_PADSTAR 0x214 /* shift-star on keypad */ # define SHF_PADPLUS 0x215 /* shift-plus on keypad */ # define SHF_PADMINUS 0x216 /* shift-minus on keypad */ # define SHF_UP 0x217 /* shift-up on keypad */ # define SHF_DOWN 0x218 /* shift-down on keypad */ # define SHF_IC 0x219 /* shift-insert on keypad */ # define SHF_DC 0x21a /* shift-delete on keypad */ # define KEY_MOUSE 0x21b /* "mouse" key */ # define KEY_SHIFT_L 0x21c /* Left-shift */ # define KEY_SHIFT_R 0x21d /* Right-shift */ # define KEY_CONTROL_L 0x21e /* Left-control */ # define KEY_CONTROL_R 0x21f /* Right-control */ # define KEY_ALT_L 0x220 /* Left-alt */ # define KEY_ALT_R 0x221 /* Right-alt */ # define KEY_RESIZE 0x222 /* Window resize */ # define KEY_SUP 0x223 /* Shifted up arrow */ # define KEY_SDOWN 0x224 /* Shifted down arrow */ # define KEY_MAX 0x224 /* Maximum curses key */ #endif /*---------------------------------------------------------------------- * PDCurses function declarations */ #ifdef HAVE_PROTO int PDC_CDECL addchnstr( chtype *, int ); int PDC_CDECL baudrate( void ); int PDC_CDECL beep( void ); int PDC_CDECL border( chtype, chtype, chtype, chtype, chtype, chtype, chtype, chtype ); int PDC_CDECL can_change_color ( void ); int PDC_CDECL clearok( WINDOW*, bool ); int PDC_CDECL color_content( short, short*, short*, short* ); int PDC_CDECL copywin( WINDOW*, WINDOW*, int, int, int, int, int, int, int ); int PDC_CDECL curs_set( int ); int PDC_CDECL def_prog_mode( void ); int PDC_CDECL def_shell_mode( void ); int PDC_CDECL delay_output( int ); int PDC_CDECL delwin( WINDOW* ); WINDOW* PDC_CDECL derwin( WINDOW*, int, int, int, int ); int PDC_CDECL doupdate( void ); WINDOW* PDC_CDECL dupwin( WINDOW* ); int PDC_CDECL endwin( void ); int PDC_CDECL erase( void ); char PDC_CDECL erasechar( void ); int PDC_CDECL flash( void ); int PDC_CDECL flushinp( void ); int PDC_CDECL getsyx( int*, int* ); int PDC_CDECL halfdelay( int ); bool PDC_CDECL has_colors( void ); int PDC_CDECL hline( chtype, int ); int PDC_CDECL immedok( WINDOW*, bool ); int PDC_CDECL inchnstr( chtype *, int ); int PDC_CDECL init_color( short, short, short, short ); int PDC_CDECL init_pair( short, short, short ); WINDOW* PDC_CDECL initscr( void ); #ifdef XCURSES WINDOW* PDC_CDECL Xinitscr( int, char ** ); #endif int PDC_CDECL intrflush( WINDOW*, bool ); int PDC_CDECL is_linetouched(WINDOW *,int); int PDC_CDECL is_wintouched(WINDOW *); char* PDC_CDECL keyname( int ); char PDC_CDECL killchar( void ); char* PDC_CDECL longname( void ); int PDC_CDECL meta( WINDOW*, bool ); int PDC_CDECL mvcur( int, int, int, int ); int PDC_CDECL mvderwin( WINDOW*, int, int ); #ifdef HAVE_STDARG_H int PDC_CDECL mvprintw( int, int, char*,... ); int PDC_CDECL mvscanw( int, int, char*,... ); #endif int PDC_CDECL mvwaddnstr( WINDOW*,int,int,char*,int ); int PDC_CDECL mvwin( WINDOW*, int, int ); int PDC_CDECL mvwinsertln( WINDOW*, int, int ); #ifdef HAVE_STDARG_H int PDC_CDECL mvwprintw( WINDOW*, int, int, char*,... ); int PDC_CDECL mvwscanw( WINDOW*, int, int, char*,... ); #endif WINDOW* PDC_CDECL newpad( int, int ); SCREEN* PDC_CDECL newterm( char*, FILE*, FILE* ); WINDOW* PDC_CDECL newwin( int, int, int, int ); int PDC_CDECL noraw( void ); int PDC_CDECL notimeout( WINDOW *, bool ); int PDC_CDECL overlay( WINDOW*, WINDOW* ); int PDC_CDECL overwrite( WINDOW*, WINDOW* ); int PDC_CDECL pair_content( int, short*, short* ); int PDC_CDECL pechochar( WINDOW *, chtype ); int PDC_CDECL pnoutrefresh( WINDOW*, int, int, int, int, int, int ); int PDC_CDECL prefresh( WINDOW*, int, int, int, int, int, int ); #ifdef HAVE_STDARG_H int PDC_CDECL printw( char*,... ); int PDC_CDECL scanw( char*,... ); #endif int PDC_CDECL raw( void ); int PDC_CDECL refresh( void ); int PDC_CDECL reset_prog_mode( void ); int PDC_CDECL reset_shell_mode( void ); int PDC_CDECL resetty( void ); int PDC_CDECL ripoffline(int, int (*)(WINDOW *, int)); int PDC_CDECL savetty( void ); int PDC_CDECL sb_init(void); int PDC_CDECL sb_set_horz(int, int, int); int PDC_CDECL sb_set_vert(int, int, int); int PDC_CDECL sb_get_horz(int *, int *, int *); int PDC_CDECL sb_get_vert(int *, int *, int *); int PDC_CDECL sb_refresh(void); int PDC_CDECL scroll( WINDOW* ); SCREEN* PDC_CDECL set_term( SCREEN* ); int PDC_CDECL setsyx( int, int ); int PDC_CDECL start_color( void ); int PDC_CDECL slk_init(int); int PDC_CDECL slk_set(int, char *, int); int PDC_CDECL slk_refresh(void); int PDC_CDECL slk_noutrefresh(void); char* PDC_CDECL slk_label(int); int PDC_CDECL slk_clear(void); int PDC_CDECL slk_restore(void); int PDC_CDECL slk_touch(void); int PDC_CDECL slk_attron(attr_t); int PDC_CDECL slk_attrset(attr_t); int PDC_CDECL slk_attroff(attr_t); WINDOW* PDC_CDECL subpad( WINDOW*, int, int, int, int ); WINDOW* PDC_CDECL subwin( WINDOW*, int, int, int, int ); int PDC_CDECL syncok(WINDOW*, bool); attr_t PDC_CDECL termattrs( void ); char* PDC_CDECL termname( void ); int PDC_CDECL touchline( WINDOW*, int ,int ); int PDC_CDECL touchwin( WINDOW* ); #if !defined (CURSES_LIBRARY) void PDC_CDECL traceoff( void ); void PDC_CDECL traceon( void ); #endif int PDC_CDECL typeahead( int ); char* PDC_CDECL unctrl( chtype ); int PDC_CDECL vline( chtype, int ); int PDC_CDECL waddchnstr( WINDOW*, chtype*, int ); int PDC_CDECL waddnstr( WINDOW*, char*, int ); int PDC_CDECL waddstr( WINDOW*, char* ); int PDC_CDECL wattroff( WINDOW*, attr_t ); int PDC_CDECL wattron( WINDOW*, attr_t ); int PDC_CDECL wattrset( WINDOW*, attr_t ); int PDC_CDECL wbkgd(WINDOW*, chtype); void PDC_CDECL wbkgdset(WINDOW*, chtype); int PDC_CDECL wborder( WINDOW*, chtype, chtype, chtype, chtype, chtype, chtype, chtype, chtype ); int PDC_CDECL wclear( WINDOW* ); int PDC_CDECL wclrtobot( WINDOW* ); int PDC_CDECL wclrtoeol( WINDOW* ); void PDC_CDECL wcursyncup(WINDOW*); int PDC_CDECL wdelch( WINDOW* ); int PDC_CDECL wdeleteln( WINDOW* ); int PDC_CDECL werase( WINDOW* ); int PDC_CDECL wgetch( WINDOW* ); int PDC_CDECL wgetnstr( WINDOW*, char*, int ); int PDC_CDECL wgetstr( WINDOW*, char* ); int PDC_CDECL whline( WINDOW*, chtype, int ); int PDC_CDECL winchnstr( WINDOW*, chtype*, int ); int PDC_CDECL winnstr( WINDOW*, char*, int ); int PDC_CDECL winsch( WINDOW*, chtype ); int PDC_CDECL winsdelln( WINDOW*, int ); int PDC_CDECL winsertln( WINDOW* ); int PDC_CDECL winsnstr( WINDOW*, char*, int ); int PDC_CDECL wmove( WINDOW*, int, int ); int PDC_CDECL wnoutrefresh( WINDOW* ); char PDC_CDECL wordchar( void ); #ifdef HAVE_STDARG_H int PDC_CDECL wprintw( WINDOW*, char*,... ); int PDC_CDECL wscanw( WINDOW*, char*,... ); #endif int PDC_CDECL wredrawln( WINDOW*, int ,int ); int PDC_CDECL wrefresh( WINDOW* ); int PDC_CDECL wscrl( WINDOW*, int ); int PDC_CDECL wsetscrreg( WINDOW*, int, int ); int PDC_CDECL wtimeout( WINDOW *, int ); int PDC_CDECL wtouchln(WINDOW *, int, int, int); void PDC_CDECL wsyncdown(WINDOW*); void PDC_CDECL wsyncup(WINDOW*); int PDC_CDECL wvline( WINDOW*, chtype, int ); #ifdef PDCURSES int PDC_CDECL raw_output( bool ); int PDC_CDECL resize_term( int, int ); WINDOW* PDC_CDECL resize_window( WINDOW*, int, int ); #endif #ifdef OBSOLETE_OR_TBD char PDC_CDECL breakchar( /* void */ ); int PDC_CDECL cursoff( /* void */ ); int PDC_CDECL curson( /* void */ ); int PDC_CDECL gettmode( /* void */ ); int PDC_CDECL mvaddrawch( /* int, int, chtype */ ); int PDC_CDECL mvaddrawstr( /* int, int, char* */ ); int PDC_CDECL mvwinsrawch( /* WINDOW*, int, int, chtype */ ); int PDC_CDECL mvinsrawch( /* int, int, chtype */ ); int PDC_CDECL saveoldterm( /* void */ ); int PDC_CDECL tabsize( /* int */ ); int PDC_CDECL waddrawstr( /* WINDOW*, char* */ ); int PDC_CDECL wtabsize( /* WINDOW*, int */ ); int PDC_CDECL win_print( /* WINDOW*, int */ ); #endif #ifdef XCURSES void XCursesExit( void ); int nocbreak( void ); int cbreak( void ); int nocrmode( void ); int crmode( void ); int noecho( void ); int echo( void ); int nodelay( WINDOW *,bool ); #endif int PDC_CDECL mouse_set( unsigned long ); int PDC_CDECL mouse_on( unsigned long ); int PDC_CDECL mouse_off( unsigned long ); int PDC_CDECL request_mouse_pos( void ); int PDC_CDECL map_button( unsigned long ); void PDC_CDECL wmouse_position( WINDOW *, int *, int * ); unsigned long PDC_CDECL getmouse( void ); unsigned long PDC_CDECL getbmap( void ); /* * Keep the compiler happy with our macros below... */ int PDC_CDECL PDC_chadd( WINDOW*, chtype, bool, bool ); int PDC_CDECL PDC_chins( WINDOW*, chtype, bool ); int PDC_CDECL PDC_ungetch( int ); void PDC_CDECL PDC_set_title( char * ); int PDC_CDECL PDC_getclipboard( char **, long * ); int PDC_CDECL PDC_setclipboard( char *, long ); int PDC_CDECL PDC_freeclipboard( char * ); int PDC_CDECL PDC_clearclipboard( void ); unsigned long PDC_CDECL PDC_get_input_fd( void ); int PDC_CDECL PDC_curs_set( int ); unsigned long PDC_CDECL PDC_get_key_modifiers( void ); int PDC_CDECL PDC_wunderline( WINDOW*, int, bool ); int PDC_CDECL PDC_wleftline( WINDOW*, int, bool ); int PDC_CDECL PDC_wrightline( WINDOW*, int, bool ); int PDC_CDECL PDC_set_line_color( short ); #else int PDC_CDECL addchnstr( /* chtype *, int */ ); int PDC_CDECL baudrate( /* void */ ); int PDC_CDECL beep( /* void */ ); int PDC_CDECL border( /* chtype, chtype, chtype, chtype, chtype, chtype, chtype, chtype */ ); int PDC_CDECL can_change_color ( /* void */ ); int PDC_CDECL clearok( /* WINDOW*, bool */ ); int PDC_CDECL color_content( /* int, short*, short*, short* */ ); int PDC_CDECL copywin( /* WINDOW*, WINDOW*, int, int, int, int, int, int, int */ ); int PDC_CDECL curs_set( /* int */ ); int PDC_CDECL def_prog_mode( /* void */ ); int PDC_CDECL def_shell_mode( /* void */ ); int PDC_CDECL delay_output( /* int */ ); int PDC_CDECL delwin( /* WINDOW* */ ); WINDOW* PDC_CDECL derwin( /* WINDOW*, int, int, int, int */ ); int PDC_CDECL doupdate( /* void */ ); WINDOW* PDC_CDECL dupwin( /* WINDOW* */ ); int PDC_CDECL endwin( /* void */ ); int PDC_CDECL erase( /* void */ ); char PDC_CDECL erasechar( /* void */ ); int PDC_CDECL flash( /* void */ ); int PDC_CDECL flushinp( /* void */ ); int PDC_CDECL getsyx( /* int*, int* */ ); int PDC_CDECL halfdelay( /* int */ ); bool PDC_CDECL has_colors( /* void */ ); int PDC_CDECL hline( /* chtype, int */ ); int PDC_CDECL immedok( /* WINDOW*, bool */ ); int PDC_CDECL inchnstr( /* chtype *, int */ ); int PDC_CDECL init_color( /* short, short, short, short */ ); int PDC_CDECL init_pair( /* short, short, short */ ); WINDOW* PDC_CDECL initscr( /* void */ ); #ifdef XCURSES WINDOW* PDC_CDECL Xinitscr( /* int, char ** */ ); #endif int PDC_CDECL intrflush( /* WINDOW*, bool */ ); int PDC_CDECL is_linetouched( /*WINDOW *,int*/ ); int PDC_CDECL is_wintouched( /*WINDOW **/ ); char* PDC_CDECL keyname( /* int */ ); char PDC_CDECL killchar( /* void */ ); char* PDC_CDECL longname( /* void */ ); int PDC_CDECL meta( /* WINDOW*, bool */ ); int PDC_CDECL mvcur( /* int, int, int, int */ ); int PDC_CDECL mvderwin( /* WINDOW*, int, int */ ); int PDC_CDECL mvprintw( /* int, int, char*,... */ ); int PDC_CDECL mvscanw( /* int, int, char*,... */ ); int PDC_CDECL mvwaddnstr(/* WINDOW*,int,int,char*,int */ ); int PDC_CDECL mvwin( /* WINDOW*, int, int */ ); int PDC_CDECL mvwinsertln( /* WINDOW*, int, int */ ); int PDC_CDECL mvwprintw( /* WINDOW*, int, int, char*,... */ ); int PDC_CDECL mvwscanw( /* WINDOW*, int, int, char*,... */ ); WINDOW* PDC_CDECL newpad( /* int, int */ ); SCREEN* PDC_CDECL newterm( /* char*, FILE*, FILE* */ ); WINDOW* PDC_CDECL newwin( /* int, int, int, int */ ); int PDC_CDECL noraw( /* void */ ); int PDC_CDECL notimeout( /* WINDOW *, bool */ ); int PDC_CDECL overlay( /* WINDOW*, WINDOW* */ ); int PDC_CDECL overwrite( /* WINDOW*, WINDOW* */ ); int PDC_CDECL pair_content( /* int, short*, short* */ ); int PDC_CDECL pechochar( /* WINDOW *pad, chtype ch */ ); int PDC_CDECL pnoutrefresh( /* WINDOW*, int, int, int, int, int, int */ ); int PDC_CDECL prefresh( /* WINDOW*, int, int, int, int, int, int */ ); int PDC_CDECL printw( /* char*,... */ ); int PDC_CDECL raw( /* void */ ); int PDC_CDECL refresh( /* void */ ); int PDC_CDECL reset_prog_mode( /* void */ ); int PDC_CDECL reset_shell_mode( /* void */ ); int PDC_CDECL resetty( /* void */ ); int PDC_CDECL ripoffline( /* int, int (*)(WINDOW *, int) */); int PDC_CDECL savetty( /* void */ ); int PDC_CDECL sb_init( /* void */ ); int PDC_CDECL sb_set_horz( /* int, int, int */ ); int PDC_CDECL sb_set_vert( /* int, int, int */ ); int PDC_CDECL sb_get_horz( /* int *, int *, int * */ ); int PDC_CDECL sb_get_vert( /* int *, int *, int * */ ); int PDC_CDECL sb_refresh( /* void */ ); int PDC_CDECL scanw( /* char*,... */ ); int PDC_CDECL scroll( /* WINDOW* */ ); int PDC_CDECL setsyx( /* int, int */ ); SCREEN* PDC_CDECL set_term( /* SCREEN* */ ); int PDC_CDECL slk_init(/* int */); int PDC_CDECL slk_set(/* int, char *, int */); int PDC_CDECL slk_refresh(/* void */); int PDC_CDECL slk_noutrefresh(/* void */); char* PDC_CDECL slk_label(/* int */); int PDC_CDECL slk_clear(/* void */); int PDC_CDECL slk_restore(/* void */); int PDC_CDECL slk_touch(/* void */); int PDC_CDECL slk_attron(/* attr_t */); int PDC_CDECL slk_attrset(/* attr_t */); int PDC_CDECL slk_attroff(/* attr_t */); int PDC_CDECL start_color( /* void */ ); WINDOW* PDC_CDECL subpad( /* WINDOW*, int, int, int, int */ ); WINDOW* PDC_CDECL subwin( /* WINDOW*, int, int, int, int */ ); int PDC_CDECL syncok(/* WINDOW*, bool */); attr_t PDC_CDECL termattrs( /* void */ ); char* PDC_CDECL termname( /* void */ ); int PDC_CDECL touchline( /* WINDOW*, int ,int */ ); int PDC_CDECL touchwin( /* WINDOW* */ ); #if !defined (CURSES_LIBRARY) void PDC_CDECL traceoff(/* void */); void PDC_CDECL traceon(/* void */); #endif int PDC_CDECL typeahead( /* int */ ); char* PDC_CDECL unctrl( /* chtype */ ); int PDC_CDECL vline( /* chtype, int */ ); int PDC_CDECL waddchnstr( /* WINDOW*, chtype*, int */ ); int PDC_CDECL waddnstr( /* WINDOW*, char*, int */ ); int PDC_CDECL waddstr( /* WINDOW*, char* */ ); int PDC_CDECL wattroff( /* WINDOW*, attr_t */ ); int PDC_CDECL wattron( /* WINDOW*, attr_t */ ); int PDC_CDECL wattrset( /* WINDOW*, attr_t */ ); int PDC_CDECL wbkgd( /*WINDOW*, chtype*/ ); void PDC_CDECL wbkgdset( /*WINDOW*, chtype*/ ); int PDC_CDECL wborder( /* WINDOW*, chtype, chtype, chtype, chtype, chtype, chtype, chtype, chtype */ ); int PDC_CDECL wclear( /* WINDOW* */ ); int PDC_CDECL wclrtobot( /* WINDOW* */ ); int PDC_CDECL wclrtoeol( /* WINDOW* */ ); void PDC_CDECL wcursyncup(/* WINDOW* */); int PDC_CDECL wdelch( /* WINDOW* */ ); int PDC_CDECL wdeleteln( /* WINDOW* */ ); int PDC_CDECL werase( /* WINDOW* */ ); int PDC_CDECL wgetch( /* WINDOW* */ ); int PDC_CDECL wgetnstr( /* WINDOW*, char*, int */ ); int PDC_CDECL wgetstr( /* WINDOW*, char* */ ); int PDC_CDECL whline( /* WINDOW*, chtype, int */ ); int PDC_CDECL winchnstr( /* WINDOW*, chtype*, int */ ); int PDC_CDECL winnstr( /* WINDOW*, char*, int */ ); int PDC_CDECL winsch( /* WINDOW*, chtype */ ); int PDC_CDECL winsdelln( /* WINDOW*, int */ ); int PDC_CDECL winsertln( /* WINDOW* */ ); int PDC_CDECL winsnstr( /* WINDOW*, char*, int */ ); int PDC_CDECL wmove( /* WINDOW*, int, int */ ); int PDC_CDECL wnoutrefresh( /* WINDOW* */ ); char PDC_CDECL wordchar( /* void */ ); int PDC_CDECL wprintw( /* WINDOW*, char*,... */ ); int PDC_CDECL wredrawln( /* WINDOW*, int ,int */ ); int PDC_CDECL wrefresh( /* WINDOW* */ ); int PDC_CDECL wscanw( /* WINDOW*, char*,... */ ); int PDC_CDECL wscrl( /* WINDOW*, int */ ); int PDC_CDECL wsetscrreg( /* WINDOW*, int, int */ ); int PDC_CDECL wtimeout( /* WINDOW *, int */ ); int PDC_CDECL wtouchln( /*WINDOW *, int, int, int*/ ); void PDC_CDECL wsyncdown(/* WINDOW* */); void PDC_CDECL wsyncup(/* WINDOW* */); int PDC_CDECL wvline( /* WINDOW*, chtype, int */ ); #ifdef PDCURSES int PDC_CDECL raw_output( /* bool */ ); int PDC_CDECL resize_term( /* int, int */ ); WINDOW* PDC_CDECL resize_window( /* WINDOW*, int, int */ ); #endif #ifdef OBSOLETE_OR_TBD char PDC_CDECL breakchar( /* void */ ); int PDC_CDECL cursoff( /* void */ ); int PDC_CDECL curson( /* void */ ); int PDC_CDECL gettmode( /* void */ ); int PDC_CDECL mvaddrawch( /* int, int, chtype */ ); int PDC_CDECL mvaddrawstr( /* int, int, char* */ ); int PDC_CDECL mvwinsrawch( /* WINDOW*, int, int, chtype */ ); int PDC_CDECL mvinsrawch( /* int, int, chtype */ ); int PDC_CDECL saveoldterm( /* void */ ); int PDC_CDECL tabsize( /* int */ ); int PDC_CDECL waddrawstr( /* WINDOW*, char* */ ); int PDC_CDECL wtabsize( /* WINDOW*, int */ ); int PDC_CDECL win_print( /* WINDOW*, int */ ); #endif #ifdef XCURSES void XCursesExit(/* void */); int nocbreak( /* void */ ); int cbreak( /* void */ ); int nocrmode( /* void */ ); int crmode( /* void */ ); int noecho( /* void */ ); int echo( /* void */ ); int nodelay( /* WINDOW *,bool */ ); #endif int PDC_CDECL mouse_set( /* long */ ); int PDC_CDECL mouse_on( /* long */ ); int PDC_CDECL mouse_off( /* long */ ); int PDC_CDECL request_mouse_pos( /* void */ ); int PDC_CDECL map_button( /* unsigned long */ ); void PDC_CDECL wmouse_position( /* WINDOW *, int *, int * */ ); unsigned long PDC_CDECL getmouse( /* void */ ); unsigned long PDC_CDECL getbmap( /* void */ ); /* * Keep the compiler happy with our macros below... */ int PDC_CDECL PDC_chadd( /* WINDOW*, chtype, bool, bool */ ); int PDC_CDECL PDC_chins( /* WINDOW*, chtype, bool */ ); int PDC_CDECL PDC_ungetch( /* int */ ); void PDC_CDECL PDC_set_title( /* char * */ ); int PDC_CDECL PDC_getclipboard( /* char **, long * */ ); int PDC_CDECL PDC_setclipboard( /* char *, long */ ); int PDC_CDECL PDC_clearclipboard( /* void */ ); unsigned long PDC_CDECL PDC_get_input_fd( /* void */ ); int PDC_CDECL PDC_curs_set( /* int */ ); unsigned long PDC_CDECL PDC_get_key_modifiers( /* void */ ); int PDC_CDECL PDC_wunderline( /* WINDOW*, int, bool */ ); int PDC_CDECL PDC_wleftline( /* WINDOW*, int, bool */ ); int PDC_CDECL PDC_wrightline( /* WINDOW*, int, bool */ ); int PDC_CDECL PDC_set_line_color( /* short */ ); #endif #ifndef max # define max(a,b) (((a) > (b)) ? (a) : (b)) #endif #ifndef min # define min(a,b) (((a) < (b)) ? (a) : (b)) #endif /* * Functions defined as macros */ #define addch( c ) waddch( stdscr, c ) #define addchstr( c ) addchnstr( c, -1 ) #define addstr(str) waddstr( stdscr, str ) #define addnstr(str, n) waddnstr( stdscr, str, n ) #define attroff(attr) wattroff( stdscr, attr ) #define attron(attr) wattron( stdscr, attr ) #define attrset(attr) wattrset( stdscr, attr ) #define bkgd(c) wbkgd(stdscr,c) #define bkgdset(c) wbkgdset(stdscr,c) #define border(ls,rs,ts,bs,tl,tr,bl,br) wborder(stdscr,ls,rs,ts,bs,tl,tr,bl,br) #define box( w, v, h ) wborder( w, v, v, h, h, 0, 0, 0, 0 ) #define clear() wclear( stdscr ) #define clrtobot() wclrtobot( stdscr ) #define clrtoeol() wclrtoeol( stdscr ) #define delch() wdelch( stdscr ) #define deleteln() wdeleteln( stdscr ) #define derwin(w,nl,nc,by,bx) subwin((w),(nl),(nc),(by+(w)->_begy),(bx+(w)->_begx)) #define draino(ms) delay_output(ms) #define echochar(c) (addch((chtype)c)==ERR?ERR:refresh()) #define erase() werase( stdscr ) #define fixterm() reset_prog_mode() #define getbegx(w) (w)->_begx #define getbegy(w) (w)->_begy #define getbegyx(w,y,x) ( y = (w)->_begy, x = (w)->_begx ) #define getbkgd(w) ((w)->_bkgd) #define getch() wgetch(stdscr) #define getmaxx(w) (w)->_maxx #define getmaxy(w) (w)->_maxy #define getmaxyx(w,y,x) ( y = (w)->_maxy, x = (w)->_maxx ) #define getparx(w) (w)->_parx #define getpary(w) (w)->_pary #define getparyx(w,y,x) ( y = (w)->_pary, x = (w)->_parx ) #define getstr(str) wgetstr( stdscr, str ) #define getnstr(str,num) wgetnstr( stdscr, str, num ) #define getsyx(y,x) { if( curscr->_leaveit) (y)=(x)=-1; else getyx(curscr,(y),(x)); } #define getyx(w,y,x) ( y = (w)->_cury, x = (w)->_curx ) #define has_colors() ((SP->mono) ? FALSE : TRUE) #define idcok(w,flag) OK #define idlok(w,flag) OK #define inch() (stdscr->_y[stdscr->_cury][stdscr->_curx]) #define inchstr( c ) inchnstr( c, stdscr->_maxx-stdscr->_curx ) #define innstr(str,n) winnstr(stdscr,(str),(n)) #define insch( c ) winsch( stdscr, c ) #define insdelln(n) winsdelln(stdscr,n) #define insertln() winsertln( stdscr ) #define insnstr(s,n) winsnstr(stdscr,s,n) #define insstr(s) winsnstr(stdscr,s,(-1)) #define instr(str) winnstr(stdscr,(str),stdscr->_maxx) #define isendwin() ((SP->alive) ? FALSE : TRUE) #define is_termresized() (SP->resized) #define keypad(w,flag) (w->_use_keypad = flag, OK) #define leaveok(w,flag) (w->_leaveit = flag, OK) #define move(y,x) wmove( stdscr, y, x ) #define mvaddch(y,x,c) (move( y, x )==ERR?ERR:addch( c )) #define mvaddchstr(y,x,c) (move( y, x )==ERR?ERR:addchnstr( c, -1 )) #define mvaddchnstr(y,x,c,n) (move( y, x )==ERR?ERR:addchnstr( c, n )) #define mvaddstr(y,x,str) (move( y, x )==ERR?ERR:addstr( str )) #define mvaddnstr(y,x,str,n) (move( y, x )==ERR?ERR:addnstr( str, n )) #define mvdelch(y,x) (move( y, x )==ERR?ERR:wdelch( stdscr )) #define mvgetch(y,x) (move( y, x )==ERR?ERR:wgetch(stdscr)) #define mvgetstr(y,x,str) (move( y, x )==ERR?ERR:wgetstr( stdscr, str )) #define mvinch(y,x) (move( y, x )==ERR?ERR:(stdscr->_y[y][x])) #define mvinchstr(y,x,c) (move( y, x )==ERR?ERR:inchnstr( c, stdscr->_maxx-stdscr->_curx )) #define mvinchnstr(y,x,c,n) (move( y, x )==ERR?ERR:inchnstr( c, n )) #define mvinsch(y,x,c) (move( y, x )==ERR?ERR:winsch( stdscr, c )) #define mvinsnstr(y,x,s,n) (move( y, x )==ERR?ERR:winsnstr(stdscr,s,n)) #define mvinsstr(y,x,s) (move( y, x )==ERR?ERR:winsnstr(stdscr,s,(-1))) #define mvinstr(y,x,str) (move( y, x )==ERR?ERR:winnstr(stdscr,(str),stdscr->_maxx)) #define mvinnstr(y,x,str,n) (move( y, x )==ERR?ERR:winnstr(stdscr,(str),(n))) #define mvwaddch(w,y,x,c) (wmove( w, y, x )==ERR?ERR:waddch( w, c )) #define mvwaddchstr(w,y,x,c) (wmove( w, y, x )==ERR?ERR:waddchnstr( w, c, -1 )) #define mvwaddchnstr(w,y,x,c,n) (wmove( w, y, x )==ERR?ERR:waddchnstr( w, c, n )) #define mvwaddrawch(w,y,x,c) (wmove( w, y, x )==ERR?ERR:waddrawch( w, c )) #define mvwaddrawstr(w,y,x,str) (wmove( w, y, x )==ERR?ERR:waddrawstr( w, str )) #define mvwaddstr(w,y,x,str) (wmove( w, y, x )==ERR?ERR:waddstr( w, str )) #define mvwdelch(w,y,x) (wmove( w, y, x )==ERR?ERR:wdelch( w )) #define mvwgetch(w,y,x) (wmove( w, y, x )==ERR?ERR:wgetch( w )) #define mvwgetstr(w,y,x,str) (wmove( w, y, x )==ERR?ERR:wgetstr( w, str )) #define mvwinch(w,y,x) (wmove( w, y, x )==ERR?ERR:((w)->_y[y][x])) #define mvwinchstr(w,y,x,c) (wmove( w, y, x )==ERR?ERR:winchnstr( w, c, (w)->_maxx-(w)->_curx )) #define mvwinchnstr(w,y,x,c,n) (wmove( w, y, x )==ERR?ERR:winchnstr( w, c, n )) #define mvwinsch(w,y,x,c) (wmove( w, y, x )==ERR?ERR:winsch( w, c )) #define mvwinstr(w,y,x,str) (wmove( w, y, x )==ERR?ERR:winnstr(w,str,(w)->_maxx)) #define mvwinnstr(w,y,x,str,n) (wmove( w, y, x )==ERR?ERR:winnstr(w,str,n)) #define mvwinsnstr(w,y,x,s,n) (wmove( w, y, x )==ERR?ERR:winsnstr(w,s,n)) #define mvwinsstr(w,y,x,s) (wmove( w, y, x )==ERR?ERR:winsnstr(w,s,(-1))) #define napms(ms) delay_output(ms) #define nl() (SP->autocr = TRUE) #define nonl() (SP->autocr = FALSE) #define redrawwin(w) wredrawln((w),0,(w)->_maxy) #define refresh() wrefresh( stdscr ) #define resetterm() reset_shell_mode() #define saveterm() def_prog_mode() #define scrl(n) wscrl(stdscr,n) #define scroll(w) wscrl((w),1) #define scrollok(w,flag) ((w)->_scroll = flag) #define setscrreg(top, bot) wsetscrreg( stdscr, top, bot ) #define setsyx(y,x) { if( (y)==-1 && (x)==-1) curscr->_leaveit=TRUE; else { curscr->_leaveit=FALSE;wmove(curscr,(y),(x));} } #define standend() wattrset(stdscr, A_NORMAL) #define standout() wattrset(stdscr, A_STANDOUT) #define timeout(n) wtimeout( stdscr, n ) #define touchline(w,y,n) wtouchln((w),(y),(n),TRUE) #define touchwin(w) wtouchln((w),0,(w)->_maxy,TRUE) #if defined (CURSES_LIBRARY) # define traceoff() {trace_on = FALSE;} # define traceon() {trace_on = TRUE;} #endif #define ungetch(ch) PDC_ungetch(ch) #define untouchwin(w) wtouchln((w),0,((w)->_maxy),FALSE) #define waddch(w, c) PDC_chadd( w, (chtype)c, (bool)!(SP->raw_out), TRUE ) #define waddchstr(w, c) (waddchnstr( w, c, -1 )) #define werase(w) (wmove((w),0,0), wclrtobot(w)) #define wclear(w) ((w)->_clear = TRUE , werase(w)) #define wechochar(w,c) (waddch(w,(chtype)c)==ERR?ERR:wrefresh(w)) #define winch(w) ((w)->_y[(w)->_cury][(w)->_curx]) #define winchstr(w, c) (winchnstr( w, c, (w)->_maxx-(w)->_curx ) ) #define winsstr(w,str) winsnstr((w),(str),(-1)) #define winstr(w,str) winnstr((w),str,(w)->_maxx) #define wstandend(w) wattrset(w, A_NORMAL) #define wstandout(w) wattrset(w, A_STANDOUT) #if !defined(UNIX) && !defined(XCURSES) /* set delaytenths = 0 added - William McBrine */ # define nocbreak() (SP->cbreak = FALSE, SP->delaytenths = 0) # define cbreak() (SP->cbreak = TRUE) # define nocrmode() (SP->cbreak = FALSE) # define crmode() (SP->cbreak = TRUE) # define noecho() (SP->echo = FALSE,OK) # define echo() (SP->echo = TRUE,OK) # define nodelay(w,flag) (w->_nodelay = flag) #endif #if defined(PDCURSES) # define addrawch( c ) waddrawch( stdscr, c ) # define addrawstr(str) waddrawstr( stdscr, str ) # define insrawch( c ) winsrawch( stdscr, c ) # define waddrawch(w, c) PDC_chadd( w, (chtype)c, FALSE, TRUE ) # define winsrawch(w, c) PDC_chins( w, (chtype)c, FALSE ) # define PDC_save_key_modifiers(flag) (SP->save_key_modifiers = flag) # define PDC_return_key_modifiers(flag) (SP->return_key_modifiers = flag) /* * FYI: Need to document these functions... */ # define title(s,a) wtitle( stdscr, s, (chtype)a ) # define titleofs(ofs) wtitleofs( stdscr, ofs ) # define wtitle(w,s,a) (w->_title = s, w->_title_attr = (chtype)a) # define wtitleofs(w,ofs) (w->_title_ofs = ofs) #endif /* * return codes from PDC_getclipboard() and PDC_setclipboard() calls. */ #define PDC_CLIP_SUCCESS 0 #define PDC_CLIP_ACCESS_ERROR 1 #define PDC_CLIP_EMPTY 2 #define PDC_CLIP_MEMORY_ERROR 3 /* * PDCurses key modifier masks */ #define PDC_KEY_MODIFIER_SHIFT (1 << 0) #define PDC_KEY_MODIFIER_CONTROL (1 << 1) #define PDC_KEY_MODIFIER_ALT (1 << 2) #define PDC_KEY_MODIFIER_NUMLOCK (1 << 3) /* * Load up curspriv.h. This should be in the same place as * stdlib.h. We allow anyone who defines CURSES_LIBRARY to have * access to our internal routines. This provides quick * PC applications at the expense of portability. */ #if defined(CURSES_LIBRARY) # include #endif #include #endif /* __PDCURSES__ */ #if defined(__cplusplus) || defined(__cplusplus__) || defined(__CPLUSPLUS) # undef bool } #endif mp3info_0.8.5a.orig/win32/getopt.c0000644000000000000000000000753310763631155017052 0ustar00usergroup00000000000000/* * Copyright (c) 1987, 1993, 1994 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by the University of * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)getopt.c 8.3 (Berkeley) 4/27/95"; #endif /* LIBC_SCCS and not lint */ #include #include #include int opterr = 1, /* if error message should be printed */ optind = 1, /* index into parent argv vector */ optopt, /* character checked for validity */ optreset; /* reset getopt */ char *optarg; /* argument associated with option */ #define BADCH (int)'?' #define BADARG (int)':' #define EMSG "" /* * getopt -- * Parse argc/argv argument vector. */ int getopt(nargc, nargv, ostr) int nargc; char * const *nargv; const char *ostr; { #ifdef WIN32 char *__progname="mp3info"; #else extern char *__progname; #endif static char *place = EMSG; /* option letter processing */ char *oli; /* option letter list index */ if (optreset || !*place) { /* update scanning pointer */ optreset = 0; if (optind >= nargc || *(place = nargv[optind]) != '-') { place = EMSG; return (-1); } if (place[1] && *++place == '-') { /* found "--" */ ++optind; place = EMSG; return (-1); } } /* option letter okay? */ if ((optopt = (int)*place++) == (int)':' || !(oli = strchr(ostr, optopt))) { /* * if the user didn't specify '-' as an option, * assume it means -1. */ if (optopt == (int)'-') return (-1); if (!*place) ++optind; if (opterr && *ostr != ':') (void)fprintf(stderr, "%s: illegal option -- %c\n", __progname, optopt); return (BADCH); } if (*++oli != ':') { /* don't need argument */ optarg = NULL; if (!*place) ++optind; } else { /* need an argument */ if (*place) /* no white space */ optarg = place; else if (nargc <= ++optind) { /* no arg */ place = EMSG; if (*ostr == ':') return (BADARG); if (opterr) (void)fprintf(stderr, "%s: option requires an argument -- %c\n", __progname, optopt); return (BADCH); } else /* white space */ optarg = nargv[optind]; place = EMSG; ++optind; } return (optopt); /* dump back option letter */ } mp3info_0.8.5a.orig/win32/mp3info.exe0000644000000000000000000020400010763631155017446 0ustar00usergroup00000000000000MZ@ !L!This program cannot be run in DOS mode. $PEL}OE 8 @P @D .textt``.dataP#$@.rdata @@.bss .idataD @ @U]U1ۉu1=wC=r[$1D$Դtlt*$л؋u]]=t=t؋u]]v=u$ 1t$wt4t$ $\$NtE$ L$$b US$]$@躶E AU\$ @D$T$L$ $ Ap2AtX @`BAt p2AD$`BAK0 $観`BAtp2A\$ `BAQP$耳k @6L$ AT$ A$$D$`BAB$%`BAUv'U$XBA&U$XBA&U |BA]t&U hBA]ᐐU]WU}E t0$&'UHD$E uu]]ȉ}}4$D$VO\$E4$D$K$U\$T$zD$<$~]u}] UWV1SEA 0(@@(@@(@@1D$ 8@|$$ D$@$ljt$?GN\$$<$11҉D$11ɉD$1D$1D$ 1D$1T$L$ D$7t$\$<$2NEAL$<$D$L6<$T$D$Nu AD$<$t$6<$D$D$MU2A>xT$D$<$5\$D$<$MEDA]EL$D$<$5<$T$D$]MUVAb|T$D$<$n5<$D$D$"MU6E<$UhAT$D$!5\$zAL$<$LU<~w @\$E$\${AT$<$4<$D$D$zLED$ED$ E <$D$AD$4<$8@D$D$7L<$AD$X40@$Y/(@U@T$ D$\$<$nMt&'! t€uҍE)L$D$E$ޮ<$UT$ L$T$Mv'! t€u4$ҍE)L$D$q<$ED$ D$D$M'! t€uҍU)щL$T$x$<$ED$ D$D$M&! t€uҍU)щL$T$U$莭<$ED$ D$D$Mv'! t€uҍUT$)ѻL$|$t$EuD$ \$<$7&! t€uҍUӃ) ! t€uҍUE)É$f9ÍU$D$EuD$S<$ED$ L$T$r! t€uҍUӃ) ! t€uҍEM)Í&'! t€uҍU)1$9D$ED$e^)E$5=wZUU$E$_=wdUĬ[^_]D$AD$E$ $AED$豪U$E$=v$AED$聪Ĭ[^_]ÐUWVS} $迥E11d1ɉ`11҉\1T1P1L1H1D1}hXlp@EEEEƅwƅX|$yAD$E$x!t`F3w$\ AD$2AD$E $舩1`yAD$|$E$!u`u lD2@D$pD$ lD$hD$D$:u l@@Ɖt]ȋu}]É~N) @4$Q4$‰׉1ҋ^u}ً]]U(uEu }}]D$ D$D$<$ڟu]u}]Ív]Eˉʁ uCFOƒV_>Ft"1]u}]؃FJuۃt։ȃF ؃NF؃FWF F$F(F,ЃF01 4$D1\t&UV1SP]vC$Ş=tAC$Ӟ;C|t t&1P[^]Í&CF$脞=uC$D$ZED$C$(u|tL$D$C$7UȃP[)^]ÍU1WVS]D$E D$C$'C$՝=t@u1Ĭ[^_]ËC$D$蛝C$dED$C$XtD$FD$C$rw'C$eS)ƒ~UhD$C$t:hD$E$t!GD$FD$C$~1{t$dhD$C$ɜ C Ĭ[^_]Ív'UE]@@Í&'UE]@0@Í&'UE]@ @Í&'UVSu4$\0&lBAPt&KLBA8t݉$D$ uڃ[^] U8]]u}{EE]u}]ÐD$D$C$胛t6D$ AD$`BA@$E]Eu}]ËC|$}t$ A<$D$ EƃVCCDL$T$C$՚CD$ D$D$CHE$~CfCD$ D$D$CgE$SƃCD$ D$D$E܉$"ƃC|$t$D$ <$ƃCL$T$D$ 4$Йƃu CD$ D$D$$茙E$qE$fE܉$[<$S4$KUW1V}SًUٕ,11(1$1 8D$ٝ0$;MLA $7} T} t1[^_]Ã} g1ɉL$M $tԋUB$Ș()DM $uu h(󥋽(1F`\t$h $xnPh$$ٝR$ؽ$ٝم0؅ٝ0$؅,ٝ,`; TIE1|$$xUB$蒗M+Y usvM@Ɖ $D$8t EH )9t!]Mۉt E FӃ1҅…UByٽ6 A(6؅0f f4E٭4ۘ٭6ۅ(ؽ,$P ٘EXƃ4$)‰؉љËE4$P$4$ٝٽ6P$ؽ6f f4Eٝ A؅٭4ۘ٭64$CPU$ٚ&'UVS]u $芔 @9|[^]ÉUTAGWVSuX^H$D$|$X\$^g<$$L$s\$T$<$Ȕ$D$G\$D$<$蜔$D$\$D$<$p$D$\$D$<$J<$L$D$/tEEֺT$FD؉D$F$=F<$D$ D$D$|Ĭ[^_]ÐU]8@uu 4$ڒt$)É\$E$"]u]ÉUE$ <9~70Ð&U A AT$D$$ A<$ A0Í&'UW1VS $hAi''~ 2Ny$ GE1~Ѓ [^_]ËEM T$$AD$訑뾍US]E;tx$EAD$L$-EuF;0tTEE=PDUE$@D$Ғu֋E[H]Ít&=v E[]E却&'UEU =~ =~Ë@UE D$AD$$Ít&UWVS u}E%T$$XlBAP%u.Ct)<%t%СLBA8tӉ$D$肑tC6w%$AMt>tC$%T$gj [^_]CԋE Cƍ&'UW V}SLAE1fEG%D$$$I%Clj$D$xu-Gt<%t$СLBA8uҡlBAP%tq)؍pt$\$$1.s.%Tw$AC$AD$腎G%D$$$OL[^_]ËU D$$릋E H tU ARtظAыU r tZ8AuA$A]E D$$>U B 5f.Bvv\$$艍U B d.#E H d.)‰))L$FU Z 1҃}…}d.E $qE @ 9d.E $Mb)‰T$U J R(ArE H$U Z Ѓ$U JDd.U B d.JE d.U B` zU BD&Ѝ]\$$\$QU /t$$*@)E X $pE U B d.E g6E @ }d.U E @ Xd.E $U J .R<1U r Ѓ$ @EU BDd." $A)É\$<$萊A A}f.U ق\$fAT$ UWVS }t‰'\tFGu [^_]Ðt&FƒX wq$hALBAF18$D$赊#LBA8lBAP%G,0<Y4$F{È,0<vp0vPG5 FG+ FG! FG FG  FGFGFG4$F ÉG4$FzlBAP%$D$袉4$F4$FU(]u}2Au @;u\@1;U2A}E ؉@;-tA@]u}]À{tC@x-Ut&3C@:52At$U$x:t"12Au@]u}]À@B;U@UA=@:::B@t0t$ AAL$T$`BA@$誇v']?u}]Ã-@@@tċM9:tt$ AD$#AD$늉2A@A@B@B@lvM 2AːUD$E}]u$荅Džx'<$E D$c<$2AC2A]u}]ÐPDCurses 2.2 - Public Domain 1994initscr(): Unable to create SP initscr(): LINES=%d COLS=%d: too small. initscr(): Unable to create curscr. initscr(): Unable to create stdscr. US=(@t(@8t =<@ t(5A0@3A @5A@3A@hj3A(@u#`BA@Pjjh?@迄$j5(@E1(@P@4@@D8@~+58@54@h?@`BA@P衄$/jj58@54@,@u#`BA@Pj$jh0@@$=5At5A(@4@+BP4@=@~o< 6Ay58@j4@HP58@j(@p\@\58@j:P$6A(@@X 4@C@9|@j(@p\58@54@0@u#`BA@Pj$jhp@@-$ 50@ A(@xdt0j,@pjPa?j0@pjPO?0@@H ,@@HU=5A5Af5Af5Af5A5A(@i)0@]ÐUjj]ÐUg- j+j,$Y7(@]U(@8%]ÐU]U(@]US=0@u u3)(@),C@(@C@+CX+CP4@[,8@CD=@t(@P@D@@DH@(@pDp@5,@,@t&58@54@50@0@u (@{TtU58@sPsTCTtWjj(@pTH(@pT>5A j0@pjP =50@Ћ]]U(@@%]ÐU50@]ÐUS]tbC8uC8 tOCHE;,@uCH S=}t(@C;B@uC ;BDu ,@@HN]]%sUWVS} Ex8x8 tzU2ZzhtczhIz<~LB8!uCrpRIMqhhF@AlPjQSVuWucI]C8t uuvuE@EEuܺM;Q]CXu<EC\E,@HTEE]+]uVTNjutsC}th^@W1M>;u v9}th^@W0N>}th^@W0;u wE;u ~ u*}th^@W0NM;u ~ t;u ~ }th^@W\0N>}th^@W?0M;u vl~ udE}tZj(@x%Pj W69U9U},F}tj(@x%PSW6E> W}(@UވP(@U݈PE܈GKe[^_]ÐUMU =0@txx0@;P };H|0@P0@]USU] Mt#xx ;J };Z| J[]ÐUE=(@uEt( tt0t7t$@@ @ 5AHh@@]ÐUWVS E] u~;@ x~ EHEt ;(@PTRf@CS ;@|΃ (@pT]ÐUVS(@@Tp<;@}94@ A(@pT2)jۍp Ap PCS ;@|ǡ(@@Tp< (@pTye[^]Uj(@PTrjpT]ÐUVSu(@pT4(ƺ;@}&jҍp Ap PZS;@|ډe[^]ÐUVSu(@pT'ƺ;@}&jҍp Ap PZS/;@|ډe[^]ÐUVSu(@pT(ƺ;@}&jҍp Ap PZS;@|ډe[^]F%dUVS=@u(@@P@ (@@P(@{Tu?j4@+CPP58@sPCTh (@pT@'=@(@BTp<jrT' jj(@pTB 58@j(@pT;@}/ XShCh@4 Aj(@pT ;@|ѡ(@@TpB 5D@#B e[^_]U ]UWVS =@=(@@ 5@5@jj~B:@t @P=@t=@t (@C8 5@TA5@%$!u 5@:A 5@A=@%e[^_]ÐUWV@@5(@ ^_]Uu@]UU=@+t'@ 6A@E $6AB@]ÐUu?]Uu?]ÐUhp6A5@JXt6AE v6AE]ÐUhp6A5@Xt6A]ÐUhp6A5@Wv6A]ÐU]UEP5@WUQH]U]Uhp6A5@W6A|6A)@]ÐUhp6A5@bWr6A]ÐUhp6A5@@W~6Az6A)@]ÐU]U(@@ ]ÐUE]ÐU5P6A5@ W$Z6Aj5@W5P6A5@V$Z6Aj5@V(@xetNUfEfBfR6AHfBfP6AHfB Rj5P6A5@5@V t' 5@V5 @5@VUE 9E%]LINESCOLS&LINES value must be >= 2 and <= %d: got %d COLS value must be >= 2 and <= %d: got %d PDC_RESTORE_SCREENPDC_PRESERVE_SCREENUWVSHuE EEjU@jU@Eȉ$5@'UhP6A5@Uh @5@Uhq@JTt PZRF@9F@ hq@Tt P-RFDZFD~@~ E9F@~v@EPhq@~D~ E9FD~ vDEPh0r@`BA@PR h[r@S P6AR6APkS@f=P6AfR6A ǍUfEfBfR6AHfBfP6AHfB RjW5@5@QT u 5@R@FeFe hnr@RfUf+UBEf+E@ׁ ǃ ljPR@UEfBfEfEEfBfEfB RjW5@5@S u" 5@R@`FdFdf^6Af+Z6ABf`6Af+\6A@ׁ Ǎ]fEfCHfCGfCW5@R$j5@RW5@mR5@R  EPREFxF $FPF FFFFFfFgEFFFpFtF,FF$FhFlF F(F$F4FF FFFHFLFXF\F`Ѝe[^_]ÐUWVS } Wju}QWEU]fSfffSfCfffCfESju%QEfWfPf9|#ÃQjuPu fKf9s}f9u} ECEfWfPfUf9P|'ÃQjuPufKfEf9C}ۺЍe[^_]UVSUM 4@(@P@ 8@(@HD(@fpDf@@ ƍ]fEfC(@f@@HfC(@f@DHfCV5@O$j5@OV5@O$j5@O5@O(@@e[^]ÐUj5@O]U5 @5@O]U] UWVSE,@E}FUBHMf 8@MfEf8@HfEE;4@U9UtHBTMQTM<48@Ѓt ffЃtUBTU EfPUfP;8@}0 "A""A58@6A%fB9| EPjuh "A5@ N(@ xtxuxt uEM; 4@e[^_]ÐU(@xu/@EP5@sME@P5@M]ÐU(@xt/@EP5@)ME@P5@M]ÐU]UEM (@9Bu9J tʁ ƒR5@tM]ÐUSE fEEPEP*f]E ËEfEE$SjEP5@)M]]ÐUSEEE fEEPEPf]E ËEfEE$SjEP5@L]]ÐU]UWVSE=,@,@BX] B\ދBT<)F% EEUfPUfPfMfX9}* "A""A6A%fB9| EPjuh "A5@]K,@@X],@@\(@ xtxuxtuЍe[^_]ÐUWVS,EEEEE=,@\;=4@}\,@pX 4@AEܣ>AE>AE>AE?AЍe[^]U]US=L@uJL@xKtt1+=t PyyޡL@xNt׉ډЋ]U]U=L@u7L@xKtFt=v Px‰Љ]ÐUEƒ=L@t=wL@xNu]UVS]f% tf{ f{ f{ {u4fS Bf%;@*A(@xgu+fS Bfw(@xgt%@*Ae@*A{ujfC %P9x:fCƁ,(@xHt!{u{t(@@e[^]UVS0=D@~ u5@:u{EPjEP5@z:}uYEPj]S5@h: SWD@t-Eأ?AEܣ?AE?AE?AE ?AЍe[^]ÐU j.t D@ÐU@@]U=0@u0@E#B<%B<]UUtE #B<%B<]U=0@uu50@]ÐUWVS]u t:S<сtt1ʉ%1 C< % C<[^_]U=0@uU0@P<]ÐUUtE %B<]ÐUj50@]ÐUh50@]Uju]Uhu]ÐUS]=0@uI;t?Cyj(@x%PR50@qt ;uЋ]UWVS ]} =0@uU;tK9|yCCyj(@x%PR50@tF;t9|xe[^_]ÐUVSu] tD;t:Cyj(@x%PRVt ;uƺЍe[^]ÐUWVS ] }}t[R;tH9|y@Cyj(@x%PRutF;t9|ąxe[^_]US]=0@uiu u50@tI;t?Cyj(@x%PR50@t ;uЋ]]UWVS ]}=0@t"u u50@)t^U;tK9|yCCyj(@x%PR50@tF;t9|xЍe[^_]ÐUVSu]t_uu VtD;t:Cyj(@x%PRV_t ;uƺЍe[^]UWVS }]tzuu W t_V;tL;u|}yACyj(@x%PRWtF;t ;u|Ń}xЍe[^_]ÐUWVS$UE0EEE)ЉEE+EEܸ}} M qXY\]и;E } E@;E |E}9}U؋E$EԋUUMATM UU ] CT}uEMUЉ }t];}E};~EEU9UE$[^_]ÐUWVS}h5AÃjW3ACTu LjW3ACXu %jW3AC\u, sX5AsT5AS5AiC{E C {CUSECC C$C(C,4@HC08@HC4C8C<C@ CD;=4@u U ;8@uCHCICJCKCLCMCNCOCPC`GCdChClCNDt EuV<u ځ V<ځu F@%F@% ƒ uF@;~HE;F <4,}  w t2 UX9]j(@x%Pj V~E9]|(@xt xuE VWVJT}fUVY}OFCMEH!E},MN!j(@x%Pj^Vj(@x%Pj?DwMj(@x%Pj^Vj(@x%PC@PVEw ӋFTU9t5VX Ve[^_]ÐUWVS }]uGe[^_]ÐU(@x u  J]ÐUjj8@HP4@HPjjCj2h j8@HP4@HPjj5,@耤ÐU=0@u 50@]UWVS ]I(@x`t@`<C8u"{Ku S|t SL@=H@t?C8u"{Kt SEt SãH@HH@ 3A(@xu"xuD@;@@}P2A@@D@(@xt 6à (@@%P Ƹ؉$(@x`t)u`u[O j2 낡P2AxKt@J(@xu,P2A@8u! P#t 5P2A蜢 u(@xt xu (@zt69},jz%PV5P2A5P2A?(@xuxt@=@@@@4P*A@@@ t D@P*A@D@Ѝe[^_]ÐU=0@u'u u50@tt-‰Љ]ÐUS]t&uu S8t S‰Ћ]]U=H@~H@E 3ABH@]ÐUU%vt@@A@@@^u A@?@A@@@]KEY_BREAKKEY_DOWNKEY_UPKEY_LEFTKEY_RIGHTKEY_HOMEKEY_BACKSPACEKEY_F0KEY_F(1)KEY_F(2)KEY_F(3)KEY_F(4)KEY_F(5)KEY_F(6)KEY_F(7)KEY_F(8)KEY_F(9)KEY_F(10)KEY_F(11)KEY_F(12)KEY_F(13)KEY_F(14)KEY_F(15)KEY_F(16)KEY_F(17)KEY_F(18)KEY_F(19)KEY_F(20)KEY_F(21)KEY_F(22)KEY_F(23)KEY_F(24)KEY_F(25)KEY_F(26)KEY_F(27)KEY_F(28)KEY_F(29)KEY_F(30)KEY_F(31)KEY_F(32)KEY_F(33)KEY_F(34)KEY_F(35)KEY_F(36)KEY_F(37)KEY_F(38)KEY_F(39)KEY_F(40)KEY_F(41)KEY_F(42)KEY_F(43)KEY_F(44)KEY_F(45)KEY_F(46)KEY_F(47)KEY_F(48)KEY_F(49)KEY_F(50)KEY_F(51)KEY_F(52)KEY_F(53)KEY_F(54)KEY_F(55)KEY_F(56)KEY_F(57)KEY_F(58)KEY_F(59)KEY_F(60)KEY_F(61)KEY_F(62)KEY_F(63)KEY_DLKEY_ILKEY_DCKEY_ICKEY_EICKEY_CLEARKEY_EOSKEY_EOLKEY_SFKEY_SRKEY_NPAGEKEY_PPAGEKEY_STABKEY_CTABKEY_CATABKEY_ENTERKEY_SRESETKEY_RESETKEY_PRINTKEY_LLKEY_ABORTKEY_SHELPKEY_LHELPKEY_BTABKEY_BEGKEY_CANCELKEY_CLOSEKEY_COMMANDKEY_COPYKEY_CREATEKEY_ENDKEY_EXITKEY_FINDKEY_HELPKEY_MARKKEY_MESSAGEKEY_MOVEKEY_NEXTKEY_OPENKEY_OPTIONSKEY_PREVIOUSKEY_REDOKEY_REFERENCEKEY_REFRESHKEY_REPLACEKEY_RESTARTKEY_RESUMEKEY_SAVEKEY_SBEGKEY_SCANCELKEY_SCOMMANDKEY_SCOPYKEY_SCREATEKEY_SDCKEY_SDLKEY_SELECTKEY_SENDKEY_SEOLKEY_SEXITKEY_SFINDKEY_SHOMEKEY_SICNO KEY NAMEKEY_SLEFTKEY_SMESSAGEKEY_SMOVEKEY_SNEXTKEY_SOPTIONSKEY_SPREVIOUSKEY_SPRINTKEY_SREDOKEY_SREPLACEKEY_SRIGHTKEY_SRSUMEKEY_SSAVEKEY_SSUSPENDKEY_SUNDOKEY_SUSPENDKEY_UNDOALT_0ALT_1ALT_2ALT_3ALT_4ALT_5ALT_6ALT_7ALT_8ALT_9ALT_AALT_BALT_CALT_DALT_EALT_FALT_GALT_HALT_IALT_JALT_KALT_LALT_MALT_NALT_OALT_PALT_QALT_RALT_SALT_TALT_UALT_VALT_WALT_XALT_YALT_ZCTL_LEFTCTL_RIGHTCTL_PGUPCTL_PGDNCTL_HOMECTL_ENDKEY_A1KEY_A2KEY_A3KEY_B1KEY_B2KEY_B3KEY_C1KEY_C2KEY_C3PADSLASHPADENTERCTL_PADENTERALT_PADENTERPADSTOPPADSTARPADMINUSPADPLUSCTL_PADSTOPCTL_PADCENTERCTL_PADPLUSCTL_PADMINUSCTL_PADSLASHCTL_PADSTARALT_PADPLUSALT_PADMINUSALT_PADSLASHALT_PADSTARALT_PADSTOPCTL_INSALT_DELALT_INSCTL_UPCTL_DOWNCTL_TABALT_TABALT_MINUSALT_EQUALALT_HOMEALT_PGUPALT_PGDNALT_ENDALT_UPALT_DOWNALT_RIGHTALT_LEFTALT_ENTERALT_ESCALT_BQUOTEALT_LBRACKETALT_RBRACKETALT_SEMICOLONALT_FQUOTEALT_COMMAALT_STOPALT_FSLASHALT_BKSPCTL_BKSPPAD0CTL_PAD0CTL_PAD1CTL_PAD2CTL_PAD3CTL_PAD4CTL_PAD5CTL_PAD6CTL_PAD7CTL_PAD8CTL_PAD9ALT_PAD0ALT_PAD1ALT_PAD2ALT_PAD3ALT_PAD4ALT_PAD5ALT_PAD6ALT_PAD7ALT_PAD8ALT_PAD9CTL_DELALT_BSLASHCTL_ENTERSHF_PADENTERSHF_PADSLASHSHF_PADSTARSHF_PADPLUSSHF_PADMINUSSHF_UPSHF_DOWNSHF_ICSHF_DCKEY_MOUSEKEY_SHIFT_LKEY_SHIFT_RKEY_CONTROL_LKEY_CONTROL_RKEY_ALT_LKEY_ALT_RKEY_RESIZEKEY_SUPKEY_SDOWNUU@$w`@]Uu~]ÐUD@@@H@]U@]U@]ÐU]U]U]U]U]UVS](@p(EP5@tatt EEEE_EEEP5@%t (@X(Ѝe[^]UuX]ÐUVS]u;4@};58@}xyVS (@X(@p e[^]UUt jR]ÐUWVS ]AC@`2A{Ju )} ;} S`CT4;Sd}$STDCXS\C HA;Kd|܉{ ~`2A);C |SdCT4SdCXKdS\C HG;} |} yxSdCT4;S`~$STDCXS\C HI;K`܉{ ~`2A);C |S`CT4S`CXK`S\C HGx Se[^_]Uu50@]ÐUVSuMU 9v 9s1It KJItIt BCIu[^]Uj]ÐUu]$@UWVSLu] DžDžb t t u^C t t t>Fu1 %  t΃ tɃ tN % ƅDžDžC;*uƅCLBA8ulBAfP%jRtjDžDPЉCLBA8ulBAfP%jR5uu Džƅ;ht;lu CЃE3 $@ʷ@\@ʷ@\@\@\@\@\@\@\@\@\@\@\@\@\@\@\@\@@\@\@@\@\@\@\@\@\@\@@@ʷ@ʷ@ʷ@\@O@\@\@\@\@:@@\@\@\@@\@@\@\@@u DžtEE>FtB빍@ƅC;^uCƅЅt]tK~>F {-u6{t0:Ss+C)Pj*P/ƄCG|@ƅƅƅƅƅ>Fm t t t߀tEE~c%8tMtB>Ft%~%8utNhƅƅݝ>F t t t߃+t -u[ƅ>FP:݅ @GP$d$ݝƅ>FtDLBA8ulBAfx%jWu.@ݝ>FDGP$d$ܵ܅ݝ݅ @ݝƅ>FtD~5LBA8ulBAfx%jWI x;{et EmƅDž>F~l+t~^-uƅ>F~1LBA8ulBAfx%jWy u1Fr|GЉ>Ft@~1LBA8ulBAfx%jW ut~%@݅ݝ؃y@݅ݝx؀tluEE݅EE݅ƅDž >F t t t߃0>FxtXu!>FDžGЃDž>FS t t t߸Džot%oXxu Dž Dž ƅ~;+t~--u( uƅ>FDžƅLBA8ulBAfx%jW tGjLBA8ulBAfx%jWf tG4LBA8ulBAfx%jW0 tFGx?;}7ƅ‰>FttFthuEEfEENet\EECtJ>Fu%H (Ћ9uCȍe[^_]ÐatracePDC_debug(): Unable to open debug log file At: %8.8d - %d secs UVSƅ=@h@h¾@ƃu`BA@Pj+jh@mX] Mb)R  Ph @Vx SuSVS4$#e[^]ÐU AQ@ Ar]ÐU]ÐU0@t&  0@QA0@uÍ&US`@t)t'`@Ku$ @Q[[]Ë d@1 @d@u뽍US2Au6`@2At%tt&`@Ku$ @ZQ[[]Ë d@1 @d@uU@?A]HUBSdT$U1ۉT$$AA uFJx|*Au Jy; mul\]Cy+DLWvNrnEo_i*%8,eS^jq3<FH@AFASA[AaAgAlAsA{AAAAAAAAAAAAAAAAAAAAAA A'A.A8AEAJAPAUA`AgAmAwA|AAAAAAAAAAAAAAAAA!A-A4ABAKARAbAjAsAAAAAAAAAAAAAAAAAAAAA$A+A5A@ALA]AnA}AAAAAAAAAAAAAAAAAAA"A(A1A8AEASA]AbAlAvAAAAAAAAAAAAAAA AA"A9AHAQAWAdAjAoAxA0 A5 AE AN AY A` Am Az A]@@ 08@P`p (08@P`p (08@P`p @` @` 08@P`p@ (08@P`p@"V]>PD}P+.@P A A AA?@@ _5   9317 4 8 6  2 0 . 0)1!2@3#4$5%6^7&8*9(aAbBcCdDeEfFgGhHiI jJ kK lL mM nNoOpPqQrRsStTuUvVwWxXyYzZ01234 5 6 7 8 9. !- ". #/ $0 %1&2'3(4)5*6+7 ,8;:;=+=,<,-_--.>./?/ `~`[{\|]}'SRf#$KJ}@@@ä@̤@֤@ߤ@@@@@@@!@*@3@<@E@O@Y@c@m@w@@@@@@@@ǥ@ѥ@ۥ@@@@@ @@!@+@5@?@I@S@]@g@q@{@@@@@@@@˦@զ@ߦ@@@@@@@%@/@9@C@M@W@a@h@o@v@}@@@@@@@@@ʧ@ӧ@ݧ@@@@@ @@!@+@4@<@G@Q@]@f@q@y@@@@@@@@Ĩ@Ш@ݨ@@@@ @@#@,@5@A@N@X@d@l@t@@@@@@@@é@ͩ@ک@@@@ @@@+@6@A@K@X@b@n@w@}@@@@@@@@@@@@Ū@˪@Ѫ@ת@ݪ@@@@@@@@ @@@@%@+@1@7@=@C@I@O@X@b@k@t@}@@@@@@@@@@ī@ͫ@֫@@@@@ @@@+@7@D@Q@]@i@v@@@@@@@@ì@ˬ@Ӭ@ݬ@@@@@ @@@$@-@7@?@J@W@d@r@}@@@@@@@@ĭ@ͭ@֭@߭@@@@@ @@@'@0@9@B@K@T@]@f@n@y@@@@@@®@ɮ@Ү@ٮ@@@@@@@(@2@=@E@@p@MP3Info 0.8.5Song Title: %sArtist Name: %sAlbum Name: %sYear: %sComment: %sTrack: %sGenre: %s (%d/%d) %s Press ^BREAK to quit %dERROR - '%s' is not a valid track number. ERROR - '%s' is not a valid genre name or number. Use '-G' for a list of valid genres. BluesClassic RockCountryDanceDiscoFunkGrungeHip-HopJazzMetalNew AgeOldiesOtherPopR&BRapReggaeRockTechnoIndustrialAlternativeSkaDeath MetalPranksSoundtrackEuro-TechnoAmbientTrip-HopVocalJazz+FunkFusionTranceClassicalInstrumentalAcidHouseGameSound ClipGospelNoiseAlt. RockBassSoulPunkSpaceMeditativeInstrumental PopInstrumental RockEthnicGothicDarkwaveTechno-IndustrialElectronicPop-FolkEurodanceDreamSouthern RockComedyCultGangsta RapTop 40Christian RapPop/FunkJungleNative AmericanCabaretNew WavePsychedelicRaveShowtunesTrailerLo-FiTribalAcid PunkAcid JazzPolkaRetroMusicalRock & RollHard RockFolkFolk/RockNational FolkSwingFast-FusionBebobLatinRevivalCelticBluegrassAvantgardeGothic RockProgressive RockPsychedelic RockSymphonic RockSlow RockBig BandChorusEasy ListeningAcousticHumourSpeechChansonOperaChamber MusicSonataSymphonyBooty BassPrimusPorn GrooveSatireSlow JamClubTangoSambaFolkloreBalladPower BalladRhythmic SoulFreestyleDuetPunk RockDrum SoloA CappellaEuro-HouseDance HallGoaDrum & BassClub-HouseHardcoreTerrorIndieBritPopNegerpunkPolsk PunkBeatChristian Gangsta RapHeavy MetalBlack MetalCrossoverContemporary ChristianChristian RockMerengueSalsaThrash MetalAnimeJPopSynthpopvhGidfxFt:a:l:y:c:n:g:p:r:rb+%u%s %s MP3Info comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it under certain conditions. See the file 'LICENSE' for more information. Use 'mp3info -h' for a usage summary or see the mp3info man page for a complete description. Copyright (C) 2006 Cedric Tefft and Ricardo CerqueiraMP3Info 0.8.5rb%s is corrupt or is not a standard MP3 file. Use the -f switch to add ID3 info to this file anyway. %s does not have an ID3 1.x tag. Error opening MP3: %sNo MP3 files specified! Error: '%s' is not a recognized genre name or number. Use the '-G' option to see a list of valid genre names and numbers Error: '%s' is not a valid track number. Valid track numbers are integers from 0 to 255. Use a value of '0' to remove the track number field Error: %s is not a valid option to the VBR reporting switch (-r) Valid options are 'a', 'm' and 'v'. Run '%s -h' for more info. @ @@@@@@@@@@@@@@@@@@@@@@@@@@q @@W @? @@/ @@@@@@@@j@@J@@@@@@@@@@none50/15 microsecsreservedCCITT J 17stereojoint stereodual channelmonoERROR: Couldn't read last 128 bytes of %s!! TAG?IIIIIICopyright (C) 2006 Cedric Tefft and Ricardo CerqueiraMP3Info 0.8.5%s %s USAGE: mp3info [ -h | -G ] mp3info [-x] [-F] [-r a|m|v] [-p FORMAT_STRING] file(s) mp3info [-d] file(s) mp3info [-i] [-t title] [-a artist] [-l album] [-y year] [-c comment] [-n track] [-g genre] file(s) OPTIONS -a artist Specify ID3 artist name -c comment Specify ID3 comment -g genre Specify ID3 genre (use -G for genre list) -l album Specify ID3 album name -n track Specify ID3 v1.1 track number -t title Specify ID3 track title -y year Specify ID3 copyright year -G Display valid genres -h Display this help page -x Display technical attributes of the MP3 file -r a|m|v Report bit rate of (VBR) files as: a - Average bit rate (float) m - Median bit rate (integer) v - Simply use the word 'Variable' (string) [default] -i Edit ID3 tag interactively -d Delete ID3 tag (if one exists) -f Force processing if file is not a standard MP3 -F Full Scan (see man page for details) -p "FORMAT_STRING" Print FORMAT_STRING with substitutions Conversion Specifiers %%f Filename without the path (string) %%F Filename with the path (string) %%k File size in KB (integer) %%a Artist (string) %%c Comment (string) %%g Musical genre (string) %%G Musical genre (integer) %%l Album name (string) %%n Track (integer) %%t Track Title (string) %%y Year (string) %%C Copyright flag (string) %%e Emphasis (string) %%E CRC Error protection (string) %%L MPEG Layer (string) %%O Original material flag (string) %%o Stereo/mono mode (string) %%p Padding (string) %%v MPEG Version (float) %%u Number of good audio frames (integer) %%b Number of corrupt audio frames (integer) %%Q Sampling frequency in Hz (integer) %%q Sampling frequency in KHz (integer) %%r Bit Rate in KB/s (see also '-r') %%m Playing time: minutes only (integer) %%s Playing time: seconds only (integer) %%S Total playing time in seconds (integer) %%%% A single percent sign Escape Sequences \n Newline \t Horizontal tab \v Vertical tab \b Backspace \r Carriage Return \f Form Feed \a Audible Alert (terminal bell) \xhh Any arbitrary character specified by the hexidecimal number hh \ooo Any arbitrary character specified by the octal number ooo \\ A single backslash character This help screen is only a summary of command-line switches See the man page for complete documentation. Extended MP3 ID3 Genres =======================%3d %-21s %u(UNKNOWN) [%d]J5@U5@J5@U5@5@U5@U5@U5@U5@J5@U5@U5@J5@U5@J5@U5@75@U5@U5@U5@U5@U5@U5@U5@U5@U5@U5@U5@U5@U5@5@y5@5@U5@J5@U5@5@U5@U5@U5@U5@5@75@5@J5@J5@J5@=5@75@5@75@J5@U5@U5@5@%%%cYesNo%%Format modifier beginning at position %d too long! Variable @@]7@6@6@6@6@6@6@6@6@6@6@6@6@6@6@6@6@6@6@6@6@6@6@6@6@6@6@6@6@6@@7@6@ 7@ 7@:@6@6@6@6@:@6@6@:@6@e:@6@@:@6@6@6@6@6@6@6@6@6@6@6@6@6@5:@:@:@6@9@9@9@6@6@6@x9@k9@;9@ 9@8@8@8@48@7@8@7@7@6@6@n7@;@0<@0<@0<@0<@0<@0<@0<@0<@<@<@0<@0<@0<@<@0<@0<@0<@0<@0<@0<@0<@<@0<@0<@0<@x<@0<@n<@0<@d<@0<@;@mp3info%s: option requires an argument -- %c %s: illegal option -- %c -LIBGCCW32-EH-2-SJLJ-GTHR-MINGW32w32_sharedptr->size == sizeof(W32_EH_SHARED)%s:%u: failed assertion `%s' ../../gcc/gcc/config/i386/w32-shared-ptr.cGetAtomNameA (atom, s, sizeof(s)) != 0h@0HA@PH0B@$IHBA8IC$C0C@CLC\CtCCCCCCDD__p__fmodeP__set_app_typey_cexit_iob_isctype^_onexitg_pctype_setmode_stricmpabortatexitatoi!calloc$clock*exit-fclose0fflush1fgetc8fopen9fprintf;fputs>fread?freeCfseekEftellGfwriteKgetenvrmallocymemmovezmemset}perrorprintfputcharputsreallocsignalsprintfsscanfstrchrstrcpystrlenstrncatstrncpystrrchrtoupperungetcvsprintfMapVirtualKeyAMessageBeep@@@@@@@@@@@@@@@@@@@@@@@@KERNEL32.dll@@@@msvcrt.dll(@(@(@(@(@(@(@(@(@(@(@(@(@(@(@(@(@(@(@(@(@(@(@(@(@(@(@(@(@(@(@(@(@(@(@(@(@(@(@(@(@(@(@(@(@(@(@(@(@(@msvcrt.dll<@<@USER32.dllmp3info_0.8.5a.orig/win32/pdcurses.a0000644000000000000000000032073210763631155017375 0ustar00usergroup00000000000000! / 1057364921 0 0 0 5402 ` b^^^^^^ ((((((((((,,0$0$0$0$3333333333========B2B2B2B2B2B2B2B2B2B2B2B2B2I$I$I$I$LLLLLLLRRRRR[[[[[[ddddddgBgBgBgBiiiiiiiioLoLoLoLoLoLoLoLoLoLoLoLoLoLoLoLoLoLoLoLoLoLoLoLoLoLoLoLoLoLoLoLVVVVVVVVVVVVVVV\\\\ZZZZZZZZZZZZ66666666PPPPPPPPPPPTTTTӔӔӔӔӔӔӔӔӔӔӔӔ....-L-L-L-L-L-L-L-L::::??????IIIIOOORRRRRRRRRRRRRRRjjjjjjjjjnjppppppttttttrrrrrrrrrrrr_addch_waddch_mvaddch_mvwaddch_echochar_wechochar_addchstr_waddchstr_mvaddchstr_mvaddchnstr_mvwaddchstr_mvwaddchnstr_waddchnstr_addchnstr_addstr_addnstr_waddstr_waddnstr_mvaddstr_mvaddnstr_mvwaddstr_mvwaddnstr_attroff_wattroff_attron_attrset_wattrset_standend_standout_wstandend_wstandout_wattron_beep_flash_bkgd_bkgdset_wbkgdset_wbkgd_wborder_border_box_hline_vline_PDC_wunderline_PDC_wleftline_PDC_wrightline_wvline_whline_clear_wclear_clrtobot_clrtoeol_wclrtoeol_wclrtobot_werase_erase_start_color_init_pair_has_colors_init_color_color_content_can_change_color_pair_content_PDC_set_line_color_PDC_init_atrtab_COLORS_COLOR_PAIRS_colourset_atrtab_delch_mvdelch_mvwdelch_wdelch_deleteln_wdeleteln_insdelln_insertln_mvwinsertln_winsertln_winsdelln_PDC_getch_mvgetch_mvwgetch_PDC_ungetch_wgetch_getstr_wgetstr_mvgetstr_mvwgetstr_getnstr_wgetnstr_getbegy_getbegx_getpary_getparx_getmaxy_getmaxx_inch_winch_mvinch_mvwinch_inchstr_winchstr_mvinchstr_mvinchnstr_mvwinchstr_mvwinchnstr_winchnstr_inchnstr_Xinitscr_initscr_endwin_isendwin_newterm_set_term_resize_term_is_termresized__curses_notice__default_lines_SP_curscr_stdscr_LINES_COLS_use_emalloc_c_pindex_c_gindex_c_ungind__getch_win__c_sh_tty_c_pr_tty_c_save_tty_c_save_trm_mallc_callc_fre_reallc_Mouse_status_c_printscanbuf_c_strbeg_c_ungch_cbreak_nocbreak_echo_noecho_halfdelay_intrflush_keypad_meta_nodelay_notimeout_raw_noraw_typeahead_timeout_wtimeout_insch_winsch_mvinsch_mvwinsch_insstr_insnstr_winsstr_mvinsstr_mvinsnstr_mvwinsstr_mvwinsnstr_winsnstr_instr_innstr_winstr_mvinstr_mvinnstr_mvwinstr_mvwinnstr_winnstr_def_prog_mode_def_shell_mode_reset_prog_mode_reset_shell_mode_resetty_savetty_curs_set_ripoffline_napms_draino_linesrippedoff_linesripped_mouse_set_mouse_on_mouse_off_map_button_request_mouse_pos_wmouse_position_getmouse_getbmap_move_wmove_clearok_idlok_idcok_immedok_leaveok_setscrreg_wsetscrreg_scrollok_nl_nonl_raw_output_overlay_overwrite_copywin_newpad_subpad_prefresh_pechochar_pnoutrefresh_PDC_getclipboard_PDC_setclipboard_PDC_freeclipboard_PDC_clearclipboard_PDC_debug_trace_on_PDC_clr_update_PDC_cursor_on_PDC_cursor_off_PDC_fix_cursor_PDC_gotoxy_PDC_putc_PDC_putctty_PDC_scroll_PDC_transform_line_PDC_doupdate_PDC_get_cursor_pos_PDC_get_cur_col_PDC_get_cur_row_PDC_get_attribute_PDC_get_cursor_mode_PDC_get_font_PDC_get_rows_PDC_get_buffer_rows_PDC_get_columns_PDC_get_scrn_mode_PDC_query_adapter_type_PDC_sanity_check_PDC_breakout_PDC_get_input_fd_PDC_get_bios_key_PDC_get_ctrl_break_PDC_rawgetch_PDC_set_ctrl_break_PDC_sysgetch_PDC_get_key_modifiers_PDC_validchar_PDC_check_bios_key_save_ip_Trapped_Mouse_status_PDC_print_PDC_scr_close_PDC_scrn_modes_equal_PDC_scr_open_PDC_resize_screen_PDC_reset_shell_mode_DllMain@12_PDC_reset_prog_mode_hConOut_hConIn_orig_scr_scr_PDC_set_80x25_PDC_set_cursor_mode_PDC_set_font_PDC_set_rows_PDC_set_scrn_mode_PDC_curs_set_PDC_set_title_PDC_memmove_PDC_beep_PDC_usleep_PDC_vsscanf_PDC_copy_win_PDC_makenew_PDC_sync_PDC_chadd_PDC_chg_attrs_PDC_chins_PDC_clr_scrn_PDC_newline_printw_wprintw_mvprintw_mvwprintw_refresh_redrawwin_wredrawln_doupdate_wnoutrefresh_wrefresh_scanw_wscanw_mvscanw_mvwscanw_scroll_scrl_wscrl_slk_init_slk_set_slk_refresh_slk_label_slk_clear_slk_restore_slk_touch_slk_attron_slk_attroff_slk_attrset_PDC_mouse_in_slk_PDC_slk_calc_slk_noutrefresh_PDC_initial_slk_slk_temp_string_baudrate_erasechar_has_ic_has_il_killchar_longname_termattrs_termname_wordchar_mvcur_touchwin_touchline_untouchwin_wtouchln_is_linetouched_is_wintouched_unctrl_keyname_delay_output_flushinp_traceon_traceoff_newwin_delwin_mvwin_subwin_derwin_mvderwin_dupwin_resize_window_wsyncup_syncok_wcursyncup_wsyncdownaddch.o/ 1057364887 0 0 100666 1150 ` L.text  `.data@.bssUjx%Pu5]Ujx%Pu u]ÐU u u5t$jx%Pu5‰Љ]ÐUS]uu Stjx%PuS‰Ћ]]Ujx%Pu5t 5‰Љ]US]jx%Pu St S‰Ћ]]Ð $5Mdi| ',E[p.filegaddch.c_addch _waddch, _mvaddchV   8 .text.data.bss_SP_stdscr# _wmove - 8_mvwaddch_echochar_wechochar_wrefresh_PDC_chaddaddchstr.o/ 1057364887 0 0 100666 1628 ` L.text  `.data@.bssUju]UWVSuM =t t} BE]BT}u*B )>tkJteB>tUJuM@ +E9~‰ߍ؃t ff؃tET@XM ISb i t}.filegbeep.c_beep _flash, .text .data.bss_SP_COLS_LINES_curscr   ( 2_wrefresh_delay_output_PDC_scroll_PDC_beepbkgd.o/ 1057364889 0 0 100666 902 ` LD.text `.data@.bssUu5]UWVS}U EE9W@G@Mt %1ȉEG@%ERWG@Ut %1ЉE܋G@%EE;O}^;w }IGTU%сt1;MuM3E E܁;UuU ʉF;w |EM;O|jwjW<$e[^_]ÐUu5]US]M t*9K@t%ʁ%H!Ёu ȉC@[]Ð "? .filegbkgd.c_bkgd _bkgdset4 L _wbkgd .text.data.bss_stdscr  "_wbkgdset_PDC_sync_wtouchlnborder.o/ 1057364889 0 0 100666 2487 ` L.text `.data@.bssUWVS ]} uJCHES JUuK<u K<uS<u S<u NjEu Eu ƋEu EEu EE u E E$u E$E(u E(u Eu Uu Eu MEu UE u U E$u U$E(u U(BEHE9#CT4CTMM B;U~ݺBEHE9#CTS{0G\q.filegcolor.c F  ( 4  C U cp w  .text.data.bss_COLORS@_atrtab _SP_curscr_memset _start_color_init_pair_has_colors_init_color_color_content_can_change_color_pair_content_PDC_set_line_color_PDC_init_atrtab_PDC_init_pair_COLOR_PAIRS_colourset delch.o/ 1057364890 0 0 100666 802 ` L.text `.data@.bssU5]ÐUWVS utj>FE^ KFTM)PBPRFTF@F\FX}th$WM>;u v9}th$WN>}th$W;u wE;u ~ u*}th$WNM;u ~ t;u ~ }th$WN>}th$WM;u vl~ udE}tZjx%Pj W9U9U},F}tjx%PSWE W}UވPU݈PE܈GKe[^_]Ð#`y~\w                  L`p    ) /f l  ).fileggetstr.c_getstr _wgetstr0 X  _getnstr ( .textF7.data.bss_stdscr_SP_waddstr _beep # _wgetch . _wmove 8_mvgetstr_mvwgetstr_wgetnstr_PDC_chadd_wrefreshgetyx.o/ 1057364892 0 0 100666 542 ` L .text `.data@.bssUUtB]UUtB]UUtB|]UUtBx]UUtB]UUtB ]Ð.fileggetyx.c_getbegy _getbegx _getpary( _getparx< _getmaxyP _getmaxxd .textx.data.bssinch.o/ 1057364892 0 0 100666 608 ` LN.text `.data@.bssUSPTH[]USEPTH[]USu u5PTH]]US]uu S CTS]]Ð A FK v.fileginch.c_inch _winch _mvinch2 _mvwinchd .text.data.bss_stdscr_wmove inchstr.o/ 1057364893 0 0 100666 1329 ` L.textp `.data@.bssU=uB +BPu]UWVSu} PTH=uAx8 Y;;A ~A )߹9}A9|[^_]ÐUUtB +BPu R]ÐUWVS}] uGTW t;x2W2;G ~G )ֺ9}B9|[^_]U=u:u u5tB +BPu‰Љ]U=u0u u5tuu`‰Љ]US]t0uu StC +CPuS‰Ћ]]US]t,uu StuuSo‰Ћ]]Ð?Sl@Y^sD.fileginchstr.c_inchstr  8  % 1& > I2 .textn.data.bss_stdscr_wmove S_winchstr_mvinchstr_mvinchnstr_mvwinchstr_mvwinchnstr_winchnstr_inchnstr initscr.o/ 1057364893 0 0 100666 5325 ` L E.text, y `.datal @.bssPDCurses 2.2 - Public Domain 1994initscr(): Unable to create SP initscr(): LINES=%d COLS=%d: too small. initscr(): Unable to create curscr. initscr(): Unable to create stdscr. US=t8t = t(hju#@Pjjh@$j5P@@D~+55h`@P$/jj55 u#@Pj$jh$=t+BP=~o<y5jHP5jp\@\5jP@X C9|jp\55u#@Pj$jh$ 5xdt0j pjPjpjP@H @Hff f ]ÐUjj]ÐU jj$]U8%]ÐU]U]US=u u)C@C@+CX+CPCD=tP@$@D(pDp@5 t&555u {TtU5sPsTCTtWjjpTpTjpjP5Ћ]]U@%]Ð  , 8!<DB"FCL#PBV$ZAj"o {) 8 >      )@   = )* /8A*J*P U ] h+r,~     =,  ++   =  ) 8+?4 9<A N Y;` k;p | :%%%%%% 9 76 45 0 P _ t3 2  1       0     0 - < G0b j/r z<*. ; -  .fileginitscr.c _initscr _endwin , _newtermB L "V / .texty.data.bss?O_SP_curscr _stdscr_LINES_COLS_l v$(,@ _mallc_callc_fre_reallc _c_ungchP% 3 _wmove D S d r     _fwrite     _newwin  _exit _fprintf _realloc _free _calloc _malloc _Xinitscr_isendwin_set_term_resize_term_is_termresized__curses_notice__default_lines_use_emalloc_c_pindex_c_gindex_c_ungind__getch_win__c_sh_tty_c_pr_tty_c_save_tty_c_save_trm_Mouse_status_c_printscanbuf_c_strbeg__imp___iob_PDC_initial_slk_linesrippedoff_linesripped_wnoutrefresh_slk_noutrefresh_resize_window_PDC_get_columns_PDC_get_rows_PDC_resize_screen_PDC_get_buffer_rows_PDC_gotoxy_curs_set_PDC_scr_close_def_shell_mode_PDC_init_atrtab_wtouchln_wclrtobot_PDC_scr_open inopts.o/ 1057364894 0 0 100666 1226 ` L.text `.data@.bssU@]ÐU@@`]ÐU@]ÐU@]ÐUMA=w H`]US]t!KI9CXB9~[]UMU tQN]UU P]ÐUMU tQK]U]U@j]ÐU@j]ÐU}y @ @]U]U]Ð!8Lr 5@Xc.fileginopts.c_cbreak  _echo4 _noechoH \  _keypad _meta _nodelay $ _raw _noraw. /N _timeoutr :| .text .data.bss_SPD X_nocbreak_halfdelay_intrflush_notimeout_typeahead_wtimeout_PDC_set_ctrl_breakinsch.o/ 1057364894 0 0 100666 841 ` L.text| `.data@.bssU x%Pu5]U x%Pu u]ÐU u u5t%x%Pu5‰Љ]US]uu St x%PuS‰Ћ]]Ð "1 I`ey  .fileginsch.c_insch _winsch* _mvinschR  .text .data.bss_SP_stdscr_wmove  _mvwinsch_PDC_chins insstr.o/ 1057364894 0 0 100666 1268 ` LR.text0 `.data@.bssU=uju5W]ÐU=uu u5(]UUtju R]UWVS u эY}t=}~E9~؍XKx3PutKyЍe[^_]ÐU=u5u u5tju5G‰Љ]ÐU=u6u u5tuu5‰Љ]US]t+uu StjuS‰Ћ]]ÐUS]t,uu StuuSg‰Ћ]]Ð 6O0Jch.fileginsstr.c_insstr _insnstr. _winsstr\  B  $ 0 .text$.data.bss_stdscr_wmove _winsch :_mvinsstr_mvinsnstr_mvwinsstr_mvwinsnstr_winsnstrinstr.o/ 1057364895 0 0 100666 1291 ` L.textp `.data@.bssU=up uPX]U=uu u5*]UUtr u R]ÐUWVS UEEMIMMA +]t|E l~ 9~؉þ9}@}WuutUBTMtU F9|M  UEPe[^_]ÐU=u6u u5tp uP‰Љ]U=u6u u5tuu5‰Љ]US]t,uu Sts uSi‰Ћ]]US]t,uu StuuS!‰Ћ]]Ð6O@Y^rB.fileginstr.c_instr _innstr. _winstr\ _mvinstr8   $ _winnstr .textl.data.bss_stdscr_wmove #_mvinnstr_mvwinstr_mvwinnstr kernel.o/ 1057364895 0 0 100666 2719 ` LR(.textG `.data|@.bssUWV5 ^_]UWV5 ^_]UWVS == 5$5 jj: t P= t= tC8 5<5p$u 5p 5De[^_]U]UWVS == 5$5 jj: t P= t= tC8 5<5p$u 5p 5D=%e[^_]ÐUWV5 ^_]Uu]UU=+t'E B]ÐUu]Uu]Ð /5;[hm{'&%$#"! "'/G_lq'&%$#"! &+4QW]|.filegkernel.c ( #P 4@ _resettyT _savettyJ Fr P _napms _draino .textG.data.bss\l0y_SP        * 8 F _raw U i _mvcur }_def_prog_mode_def_shell_mode_reset_prog_mode_reset_shell_mode_curs_set_ripoffline_linesrippedoff_linesripped_c_pr_tty_c_sh_tty_c_save_tty_delay_output_PDC_curs_set_PDC_reset_shell_mode_PDC_reset_prog_mode_PDC_set_rows_PDC_set_scrn_mode_PDC_get_scrn_mode_PDC_scrn_modes_equal_PDC_set_font_PDC_get_font_PDC_cursor_on_PDC_set_ctrl_break_PDC_get_ctrl_break mouse.o/ 1057364896 0 0 100666 1154 ` L.text0 `.data@.bssUUPH]ÐUE BH]UE!BH]UUPL]ÐU ]UVSUu ]uPB;#J; B;~ B ;+B+B[^]U@H]ÐU@L]Ð1K^chmrw|.filegmouse.c  , $D 0Z C T  _getbmap .text%.data.bss_SP^t_mouse_set_mouse_on_mouse_off_map_button_request_mouse_pos_wmouse_position_getmouse_Trapped_Mouse_status_Mouse_statusmove.o/ 1057364896 0 0 100666 544 ` LD .text `.data@.bssUMU =txx;P };H|P]USU] Mt#xx ;J };Z| J[]Ð  1 9 .filegmove.c_move _wmoveF .text.data.bss_stdscroutopts.o/ 1057364896 0 0 100666 1144 ` Lf.text  `.data@.bssUMU tQH]UMU tQO]UMU tQP]UMU tQL]UMU tQIt]ÐUUM =t+x';9; }P`Hd]USUM ]t#x; 9;Z} J`Zd[]UMU tQJ]U@]ÐU@]ÐUUP]ÐBVm.filegoutopts.c_clearok _idlok _idcok8 _immedokT _leaveokp   " _nl> _nonlR %f .text{ .data.bss_stdscr_LINES_SP1 @ P_setscrreg_wsetscrreg_scrollok_raw_output_PDC_cursor_on_PDC_cursor_offoverlay.o/ 1057364897 0 0 100666 1245 ` L.text `.data@.bssUWVS] }Ep;s}sUz;{}{MAUJ CS 9~ʋMIMEHCC9~9|9} )U)EMQ;SC)ֿUB+{MQ;SC)Љ¹UB+KjEPEPWQM1PMPVRSue[^_]ÐUWVS] }Ep;s}sUz;{}{MAUJ CS 9~ʋMIMEHCC9~9|9} )U)EMQ;SC)ֿUB+{MQ;SC)Љ¹UB+KjEPEPWQM1PMPVRSue[^_]ÐUWVS,} u]U M$EEEE]u}tt;=t;W ;O xyqE@+EE؋E@ +EEԉ)؉);M~M؉;E~UԋEȉE܋EЉE 1E(PRQuuuuuuWue[^_]Ð / r  .filegoverlay.c_overlay  _copywin< .text .data.bss_curscr _overwrite_PDC_copy_win pad.o/ 1057364897 0 0 100666 2553 ` LR.text@' `.data@.bss`UWVS jju uǃ;u_Tju uW9} GT4C9| wXw\wT<$GTE 9s@GT 9rF;uVG8 0E;~H@E ;~HPe[^_]ÐUWVS]} Mu+CE+SU2C8t';K|";s|CC9E0CC 9~ u}{}u UҋC ‰UVQuWE}C./?/ `~`[{\|]}'SRf#$KJ} !g"" ""*"?"bnz" #2<J[go!.=HVeny;"W"fy"""&4S"o"~"""" *=)ap+#:#w#####""$ ". "S l %q & % ' % (       * .filegpdckbd.c_kptab !, :. L^uN  "     D    &   .8 .text0 .data.bss0_save_ip B Xbl_SPv_hConIn _pdc_key_modifiers_keyCount_ext_kptab_PDC_breakout_PDC_get_input_fd_last_button_no.0_Actual_Mouse_status.1_PDC_get_bios_key_PDC_get_ctrl_break_PDC_rawgetch_PDC_set_ctrl_break_PDC_sysgetch_save_press.2_GetInterestingEvent_win32_kbhit_win32_getch_PDC_get_key_modifiers_PDC_validchar_PDC_check_bios_key_Trapped_Mouse_status_c_ungind_c_pindex_c_gindex__getch_win__MapVirtualKeyA@8_WaitForSingleObject@8_PeekConsoleInputA@16_ReadConsoleInputA@16_PDC_mouse_in_slkpdcprint.o/ 1057364912 0 0 100666 351 ` L .text `.data@.bssU]Ð.filegpdcprint.c .text .data.bss_PDC_print pdcscrn.o/ 1057364914 0 0 100666 4893 ` LR 2.textw `.data @.bssU55$ j555$ j5xetNUfEfBfHfBfHfB Rj555 t' 555UE 9E%]LINESCOLS&LINES value must be >= 2 and <= %d: got %d COLS value must be >= 2 and <= %d: got %d PDC_RESTORE_SCREENPDC_PRESERVE_SCREENUWVSHuE EEjjEȉ$5h5h5ht PF@F@ ht PFDFD~@~ E9F@~v@EPh~D~ E9FD~ vDEPh@@P hk Pf=f ǍUfEfBfHfBfHfB RjW55 u 5FeFe h~fUf+UBEf+E@ׁ ǃ ljP UEfBfEfEEfBfEfB RjW5 5 u" 5  `FdFdff+ Bff+ @ׁ Ǎ]fEfCHfCGfCW5$j5W55  EPEFxF $FPF FFFFFfFgEFFFpFtF,FF$FhFlF F(F$F4FF FFFHFLFXF\F`Ѝe[^_]ÐUWVS } WjuWEU]fSfffSfCfffCfESjuEfWfPf9|#ÃQjuu fKf9s}f9u} ECEfWfPfUf9P|'ÃQjuufKfEf9C}ۺЍe[^_]UVSUM P@ HDfpDf@@ ƍ]fEfCf@@HfCf@DHfCV5$j5V5$j55@e[^]ÐUj5]U55]U] "'06;BJOWr} 10/*/1?0L.k!-1,06;"KP+Vqv1,"+>ELS#**)2(:'S&9$%-@EPU_dot}.filegpdcscrn.c_save_ci ! 0 F T f y   .textw.data.bss_hConOut_hConIn _scr _SP );Ki{_LINES_COLS     _free _malloc _fprintf ( 9 _atoi _getenv G_ciSaveBuffer_dwConsoleMode_PDC_scr_close_PDC_scrn_modes_equal_PDC_scr_open_FitConsoleWindow_PDC_resize_screen_PDC_reset_shell_mode_DllMain@12_PDC_reset_prog_mode_orig_scr_SetConsoleScreenBufferSize@8_SetConsoleWindowInfo@12_WriteConsoleOutputA@20_SetConsoleActiveScreenBuffer@4_SetConsoleMode@8_GetStdHandle@4_GetConsoleScreenBufferInfo@8_GetConsoleMode@8__imp___iob_ReadConsoleOutputA@20_GetNumberOfConsoleMouseButtons@4_PDC_get_ctrl_break_PDC_get_scrn_mode_PDC_query_adapter_type_PDC_get_cursor_mode_PDC_get_cursor_pos_PDC_get_columns_PDC_get_rows pdcsetsc.o/ 1057364916 0 0 100666 996 ` L.textl `.data@.bssU]U]U]U]U]UVS]p(EP5tatt EEEE_EEEP5t X(Ѝe[^]Uu]Ð>KP.filegpdcsetsc.c   ( 6 D( W2 e .text.data.bss_SP_hConOutt_PDC_set_80x25_PDC_set_cursor_mode_PDC_set_font_PDC_set_rows_PDC_set_scrn_mode_PDC_curs_set_PDC_set_title_GetConsoleCursorInfo@8_SetConsoleCursorInfo@8_SetConsoleTitleA@4pdcutil.o/ 1057364919 0 0 100666 4578 ` L.text X `.data@.bssUVSuMU 9v 9s1It KJItIt BCIu[^]Uj]ÐUu]$@UWVSLu] DžDžb t t u^C t t t>Fu1 %  t΃ tɃ tN % ƅDžDžC;*uƅC8ufP%jRtjDžDPЉC8ufP%jRuu Džƅ;ht;lu CЃE3 $* * o n o ***  o  o o u DžtEE>FtB빍@ƅC;^uCƅЅt]tK~>F {-u6{t0:Ss+C)Pj*PƄCG|@ƅƅƅƅƅ>Fm t t t߀tEE~c%8tMtB>Ft%~%8utNhƅƅݝ>F t t t߃+t -u[ƅ>FP:݅ pGP$d$ݝƅ>FtD8ufx%jWu.pݝ>FDGP$d$ܵ܅ݝ݅ pݝƅ>FtD~58ufx%jWx;{et EmƅDž>F~l+t~^-uƅ>F~18ufx%jWu1Fr|GЉ>Ft@~18ufx%jWut~%p݅ݝ؃yp݅ݝx؀tluEE݅EE݅ƅDž >F t t t߃0>FxtXu!>FDžGЃDž>FS t t t߸Džot%oXxu Dž Dž ƅ~;+t~--u( uƅ>FDžƅ8ufx%jWtGj8ufx%jWtG48ufx%jWtFGx?;}7ƅ‰>FttFthuEEfEENet\EECtJ>Fu%H (Ћ9uCȍe[^_]ÐU hKUp $(,048<@DHLPTX\`dhlptx|"e^hA; E ` q {     .filegpdcutil.c L ^ 'x .text X.data.bss4_Sleep@4CW_memset f p_PDC_memmove_PDC_beep_PDC_usleep_PDC_vsscanf_MessageBeep@4__imp____mb_cur_max__imp___pctype__isctypepdcwin.o/ 1057364919 0 0 100666 3408 ` L .textL  `.data@.bssUWVS$UE0EEE)ЉEE+EEܸ}} M qXY\]и;E } E@;E |E}9}U؋E$EԋUUMATM UU ] CT}uEMUЉ }t];}E};~EEU9UE$[^_]ÐUWVS}hÃjWCTu LjWCXu %jWC\u, sXsTSiC{E C {CUSECC C$C(C,HC0HC4C8C<C@ CD;=u U ;uCHCICJCKCLCMCNCOCPC`GCdChClCNDt EuV<u ځ V<ځu F@%F@% ƒ uF@;~HE;F <4,}  w t2 UX9]jx%Pj V~E9]|xt xuE VWVJT}fUVY}OFCMEH!E},MN!jx%Pj^Vjx%Pj?DwMjx%Pj^Vjx%PC@PVEw ӋFTU9t5VX Ve[^_]ÐUWVS }]uG  $ 2 .text*.data.bss_stdscr_curscr_SP< H \ _getenv j z  _wmove   _redrawwin_wredrawln_doupdate_wnoutrefresh_wrefresh_PDC_gotoxy_PDC_transform_line_PDC_doupdate_PDC_clr_update_PDC_breakout_reset_prog_mode_mvwprintw_wattrsetscanw.o/ 1057364898 0 0 100666 1313 ` L.textL! `.data@.bssU=uJ 5h5tE Puh‰Љ]US]t@ ShStEPu h‰Ћ]]US=udu u5څtG 5h5څtEPuh‰Ћ]]ÐUVS]tUuu St= ShStEPuh‰Ѝe[^]   &/5 :UZ~     7<m.filegscanw.c_scanw _wscanwf _mvscanw L .text!.data.bss_stdscr_wmove  _wgetstr + 5_mvwscanw_c_printscanbuf_PDC_vsscanf_wrefresh scroll.o/ 1057364899 0 0 100666 890 ` L^.text, `.data@.bssUUt jR]ÐUWVS ]AC@{Ju )} ;} S`CT4;Sd}$STDCXS\C HA;Kd|܉{ ~);C |SdCT4SdCXKdS\C HG;} |} yxSdCT4;S`~$STDCXS\C HI;K`܉{ ~);C |S`CT4S`CXK`S\C HGx Se[^_]Uu5]Ð?  3 s .filegscroll.c_scroll _blank.0_scrl _wscrl" .text.data.bss_stdscr _PDC_syncslk.o/ 1057364899 0 0 100666 6104 ` L5.text `.data @.bssUE=uEt( tt0t7t$   ]ÐUWVS E] u~; x~ EHEt ;PTRJ] af"4" 318M!R/[a!f2w!1"4"3 "4-!Mcm!"4!"0"4"(.7"L"T-l!/!1!","+"#/4"<,H\c"q"y+"*") "($2Jf"n,~"""#$ '&".,<I"\,h"p4y$"&"%""*($39B$MSXcjo$ '/:$DLT\gms~$     & . 6 $@ H P X ` k z   " "     .filegslk.c_labels# .: Dr Q0ap`_slk_set z  \       Z      0 .text .data.bss+@_SP_LINES_COLS< _whline _newwin G _wattron Q [ e o } _memset _waddstr _strcpy _strncpy  _wmove _space_seperator_label_length_label_fmt_label_line_slk_init_PDC_slk_set_slk_attributes_slk_start_col_slk_save_slk_refresh_slk_label_slk_clear_slk_restore_slk_touch_slk_attron_slk_attroff_slk_attrset_PDC_slk_init_PDC_mouse_in_slk_PDC_slk_calc_slk_noutrefresh_PDC_initial_slk_slk_temp_string_mvwprintw_wattroff_wtouchln_wrefresh_wattrset_wnoutrefresh_doupdate_PDC_chaddtermattr.o/ 1057364900 0 0 100666 862 ` Lr.text, `.data@.bssUK]U]U]U]U] (Clone)Uxth2h]ÐUx u]U帀]U]ÐCQV[cu.filegtermattr.c   _has_ic _has_il ( #< -7l B LV .text.data.bss_SP_strcat `_baudrate_erasechar_killchar_longname__display_termattrs_termname__shrtnme_wordcharterminfo.o/ 1057364900 0 0 100666 538 ` L.textP `.data@.bssUVS]u;};5}xyVSXp e[^]  0 5 = .filegterminfo.c_mvcur .textP.data.bss_LINES_COLS_SP _PDC_gotoxytouch.o/ 1057364900 0 0 100666 920 ` L<.text `.data@.bssUS]t);K}CXS\C HA;K|[]UVS]U ut=;S;C~)э9}ƋCXS\C HA9|[^]UMt);Q}AXA\B;Q|]UWVS]U u}tW;S;C~Cэ9}5ƅtCXS\C HCXC\A9|͸[^_]ÐUUM t;JxBX C    / 9 C W c  $ ( , 0 4 8 < @ D H L P T X \ ` d h l p t x |                                            $ ( , 0 4 8 < @ D H L P T X \ ` d h l p t x |                                            $ ( , 0 4 8 < @ D H L P T X \ ` d h l p t x |                                            $ ( , 0 4 8 < @ D H L P T X \ ` d h l p t x |                                            $ ( , 0 4 8 < @ D H L P T X \ ` d h l p t x |             .filegutil.c_strbuf_unctrl  _keyname    *  _traceonR  (^  .textj .data$.bss2<FPZ f_key_name.0_delay_output_flushinp_traceoff_c_gindex_c_pindex_c_ungind_trace_on_PDC_usleepwindow.o/ 1057364901 0 0 100666 3627 ` Lt !.text0 , `.data@.bssUWVS }M]u )σ} u )؉E ;B@u ;BDSQu WƃE9}^Tju UuU9} FT4C;]| vXv\vT4$BFTME 9s@FT] 9rE9}Me[^_]UVSuttF8!u9;^}/FT8t'FT<t 4C;^} FT<uك vXv\vT4$e[^]USUM ]tAB;xB ;yJZjrjR]]ÐUWVS ]}Mu+CE+CE;K|";s|E CC9 7CC 9~ } uEЉE CE u}{ VQWu tsC o8c Dfz ,4m  .filegwindow.c_newwin _delwin: _mvwin _subwin( _derwin@ t _dupwin  _wsyncupV _syncok  ) .text/ ,.data.bss_LINES_COLS_SP_callc_fre_curscr4 C _wmove _copywin N X e_mvderwin_resize_window_wcursyncup_wsyncdown_is_wintouched_wclrtobot_wtouchln_PDC_makenew mp3info_0.8.5a.orig/win32/truncate.c0000644000000000000000000000050010763631155017360 0ustar00usergroup00000000000000#ifdef __MINGW32__ #include #include int errno; int truncate(const char *name, off_t length) { int fd, code, xerrno; fd = open(name, O_WRONLY); if(fd < 0) return -1; code = chsize(fd, length); xerrno = errno; close(fd); errno = xerrno; return code; } #endif