Initial revision

This commit is contained in:
Miguel de Icaza 1998-02-27 04:54:42 +00:00
parent f565dd1e9f
commit eb6b3842ab
471 changed files with 152980 additions and 2501 deletions

339
COPYING Normal file
View File

@ -0,0 +1,339 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
675 Mass Ave, Cambridge, MA 02139, USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) 19yy <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) 19yy name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
Public License instead of this License.

934
FAQ Normal file
View File

@ -0,0 +1,934 @@
Midnight Commander
Questions and Answers
The newest version of this document is available at
http://mc.blackdown.org/mc/answers0.html
* 1 Getting started
+ 1.1 What is Midnight Commander?
+ 1.2 [UPDATED] Does it run on my machine?
+ 1.3 Does it work with my terminal?
+ 1.4 What else do I need to run MC?
+ 1.5 Is Midnight Commander PD? Copyrighted?
+ 1.6 Where can I get Midnight Commander?
+ 1.7 I don't have FTP access. Where can I get MC?
* 2 Keyboard
+ 2.1 What does documentation mean with the C-?, M-? and F?
keys?
+ 2.2 [UPDATED] Why don't function keys (or some other key)
work?
+ 2.3 How do I use function keys F11 to F20?
+ 2.4 Why does the ESC key behave funny?
+ 2.5 How can I add the plus sign (+) on the command line?
* 3 Mouse
+ 3.1 How do I enable mouse support?
+ 3.2 How do I cut and paste text with mouse?
* 4 Display
+ 4.1 Why do I keep getting "Terminal not powerful enough for
SLang"?
+ 4.2 [UPDATED] Why don't line drawing characters work?
+ 4.3 Can one use latin-1 characters without losing the lines?
+ 4.4 I have problems with entering/viewing national
characters!
+ 4.5 How can I get colors?
+ 4.6 My color_xterm goes completely (or partially) black!
+ 4.7 Where can I get color_xterm?
+ 4.8 I got colors working with MC but the other programs don't
work at all anymore!
+ 4.9 Why are there both terminfo and termcap? Wouldn't one
database be enough?
* 5 Graphical user interface
+ 5.1 Xview and Tk editions?
* 6 Command line problems
+ 6.1 How do I stay in the last directory when I exit Midnight
Commander?
+ 6.2 How can I access command line history?
+ 6.3 How can I complete commands, file names, variable names
and so on?
+ 6.4 [NEW] I am using ksh. Can I use functions defined in the
.kshrc within MC?
+ 6.5 [NEW] Is there any way to include additional options or
hot keys to MC?
* 7 Virtual file systems
+ 7.1 How can I see the contents of a tar archive?
+ 7.2 How do I get out of a tar archive?
+ 7.3 How do I do anonymous ftp with MC?
+ 7.4 How do I do non-anonymous ftp with MC?
+ 7.5 How do I close an ftp connection?
+ 7.6 Why aren't the contents of ftp panel updated?
+ 7.7 [NEW] What kind of proxy server works with Midnight
Commander?
* 8 Other common problems
+ 8.1 [UPDATED] How do I get the internal editor to work?
+ 8.2 Why doesn't "mcedit newfile" work?
+ 8.3 [UPDATED] Is there any way to 'bookmark' favourite ftp-fs
links?
+ 8.4 When copying the directories lose their original date,
uid and gid!
+ 8.5 [UPDATED] Why I keep getting: "There is no disk in the
drive. Please insert a disk into drive D:"?
+ 8.6 [NEW] When I start Midnight Commander, nothing happens!
+ 8.7 [NEW] When I try to view a file MC hangs!
* 9 Development
+ 9.1 Who has written Midnight Commander?
+ 9.2 Do I dare to use a development version?
+ 9.3 How can I report a bug/request for a feature?
+ 9.4 How can I join the development?
* 10 More information
+ 10.1 [UPDATED] This document didn't answer my question. Where
else can I look for an answer?
+ 10.2 What mailing lists are there for Midnight Commander?
+ 10.3 Where should I look on the World Wide Web for MC stuff?
+ 10.4 Are the mailing lists archived anywhere?
* 11 Administrivia
+ 11.1 Authorship
+ 11.2 [UPDATED] File formats
+ 11.3 Feedback is invited
+ 11.4 Disclaimer and copyright
1 Getting started
1.1 What is Midnight Commander?
The Midnight Commander is a user-friendly yet powerful file manager
and visual shell, useful to novice and guru alike. It provides a
clear, user-friendly, and somewhat protected interface to a Unix
system while making many frequent file operations more efficient and
preserving the full power of the command prompt. You will wonder how
you could ever live without it.
For more thorough description take a look at the announcement of
Midnight Commander 4.0.
1.2 [UPDATED] Does it run on my machine?
Yes, Midnight Commander can run on almost any machine, including Unix
clones, Windows 95/NT and OS/2. Midnight Commander does not run on
Macintosh.
Midnight Commander uses GNU autoconfigure which can automatically
configure Midnight Commander for use on almost any (if not every) Unix
clone. Following configurations have been tested:
* i386-*-linux1.x, 2.x
* alpha-linux-linux2
* sparc-linux-linux2.x
* sparc65-linux-linux2.1
* mips-sgi-irix5.x, 6.x
* mips-dec-ultrix4.3
* rs6000-ibm-aix3.2.5
* sparc-sun-sunos4.1
* sparc-sun-solaris2.3, 2.4, 2.5
* sparc-sun-netbsd1.0
* hppa-hp-hpux9
* hppa-hp-hpux7
* m68k-apple-aux
* unixware
* mc88110-aviion-dgux5.4R2.01
* i386-*-sco3.2v4.2
* i386-*-sco3.2v5
* i386-*-windows-nt-3.51, 4.0
* i386-*-windows95
* i386-*-os2
See http://mc.blackdown.org/mc/download.html.
There is also a preliminary Ms-Dos port at
http://mc.blackdown.org/cgi-mc/download/DOS/.html (but no Ms-Dos
binary).
Windows 95/NT port is compiled with Microsoft Visual C++ but it might
be possible to use cygwin32 or djgpp instead.
1.3 Does it work with my terminal?
Yes, it does.
Because Midnight Commander is a full screen program it doesn't run on
dummy terminals but anything more advanced will do (like vt100). If
your terminal works with vi, emacs, elm or pine it will work with
Midnight Commander.
The XView and Tk editions currently under development will require an
X terminal.
1.4 What else do I need to run MC?
You need an Unix compatible operating system or Windows 95/NT or OS/2.
If you want to use mouse on the Linux console you need General Purpose
Mouse server from iride.unipv.it: /pub/gpm/. You need nothing extra to
use mouse on xterm.
To compile the XView edition (currently under development) you need
XView library. Xpm library and X11 non-rectangular shape extensions
are recommended.
To compile the Tk edition (currently under development) you need
Tk-4.0 libraries. Compilation of the Tk version won't be easy. Contact
Miguel for details.
If you do not want to use the slang library you could try using
ncurses (we recommend only version 4.1 and above).
You can get it along with other curses libraries, too, but results may
not be pretty or even usable.
1.5 Is Midnight Commander PD? Copyrighted?
Midnight Commander is under GNU Public License which basically means
that you may freely copy, change and distribute it, but that you may
not impose any restrictions on further distribution, and that you must
make the source code available. This is not the same as Public Domain.
For details, the GNU license is included in the Midnight Commander
source distribution (the COPYING file).
Midnight Commander is nowadays officially a part of GNU project. All
the authors of the Midnight Commander have given all their rights on
the program to the Free Software Foundation.
1.6 Where can I get Midnight Commander?
See http://mc.blackdown.org/mc/download.html. There are about seventy
download sites. Note that the newest files might not be present on all
the download sites yet.
In short: the main site is ftp://ftp.nuclecu.unam.mx/linux/local/ and
the sunsite.unc.edu mirrors have MC in the
/pub/Linux/utils/file/managers/mc directory.
1.7 I don't have FTP access. Where can I get MC?
Most Linux CD-ROMs include Midnight Commander. For example, Slackware,
Yggdrasil, S.U.S.E., Jurix, RedHat, Caldera and Debian.
2 Keyboard
2.1 What does documentation mean with the C-?, M-? and F? keys?
Midnight Commander documentation uses emacs style names for keyboard
keys.
C stands for the Ctrl key. For example, C-f means that you should hold
down the Ctrl key and press the f key.
M stands for the Meta key. Your terminal might call it Alt or Compose
instead of Meta. For example, M-f means that you should hold down the
Meta/Alt/Compose key and press the f key. If your terminal doesn't
have Meta, Alt or Compose or they don't work you can use Esc. For M-f
press the Esc key and then press the f key.
F? stands for a function key. If your terminal doesn't have function
keys or they don't work you can use Esc. For example, for F3 press the
Esc key and then press the 3 key.
2.2 [UPDATED] Why don't function keys (or some other key) work?
Your terminfo or termcap database has missing or incorrect definations
for function keys. Type "mc -V" to see what terminal database is being
used. If the result is "using the S-Lang library with terminfo
database" you should install one of the enhanced terminfo databases
included in the Midnight Commander source distribution. For example,
if you are using xterm type "tic xterm.ti".
If the result is "using the S-Lang library with termcap database" you
should fix your /etc/termcap database.
Best terminfo database is bundled with ncurses 4.2
You can select whether Midnight Commander will use terminfo or termcap
database by giving --with-terminfo or --with-termcap option to the
configure. Default is terminfo if found, otherwise termcap.
If you don't have permissions to edit terminal databases you can use
Learn keys feature of Midnight Commander instead. Press Esc 9 o k and
follow instructions.
If all else fails you can emulate function keys by first pressing the
ESC key and then one of the number keys. For example, if you want to
produce F9, press ESC, then 9. If you don't have a ESC key on your
keyboard you can try alt-9 or meta-9.
2.3 How do I use function keys F11 to F20?
These can mapped to function keys F1 to F10 with Shift held. eg.
function key F13 can be activated by pressing Shift-F3. You can define
the keys this way in the Options menu. The convention for PC keyboards
is that F11-20 always means Shift with F1-10
Note! Windows 95/NT and OS/2 ports use F11 and F12 keys to change the
current disk drive. In this case F11 and F12 mean the real F11 and F12
keys, not shift-F1 and shift-F2.
2.4 Why does the ESC key behave funny?
Midnight Commander uses the ESC key as a prefix for simulating the
Meta and Alt keys (for terminals which don't have Meta or Alt, see the
three previous questions). For example, pressing ESC-a is the same as
pressing Meta-a. In addition most terminals use ESC for internal
representation of arrow keys, function keys and other enhanced keys.
If you want to use ESC to cancel things you have to press it twice i.
e. ESC-ESC. If you find this cumbersome you can generally use F10 to
cancel. Alternatively turn on the old_esc_mode setting in the
~/.mc.ini file. The old_esc_mode setting makes ESC work as a prefix
only if another key is pressed within 0.5 seconds. After 0.5 seconds
the ESC key cancels. There is no way to make ESC cancel immediately
(if we want to be able to use arrows keys and function keys).
X terminals allow more control over keyboard, so these ESC limitations
might not concern the forthcoming XView and Tk editions of the
Midnight Commander.
2.5 How can I add the plus sign (+) on the command line?
Press C-q first, then press the + sign.
The plus key is the hotkey for the select files command. If you want
to add a literal plus on to the command line you must quote it by
pressing C-q first.
Another common key which needs the C-q prefix is backslash "\".
3 Mouse
3.1 How do I enable mouse support?
Invoke mc like this (without quotes): "mc -x". If this doesn't work
upgrade to a terminal which compatible with the Xterm mouse sequences.
Alternatively, on Linux console you can use GPM.
3.2 How do I cut and paste text with mouse?
Hold down shift key while using mouse to cut'n'paste.
4 Display
4.1 Why do I keep getting "Terminal not powerful enough for SLang"?
This means that your terminfo databases do not contain the correct
definitions for your terminal.
You could try using a different terminal setting. If you use csh or
tcsh:
setenv TERM vt100
or if you use sh, bash, ksh or zsh:
export TERM=vt100
If this doesn't help you can recompile MC to use termcap instead of
terminfo:
./configure --with-termcap
make
4.2 [UPDATED] Why don't line drawing characters work?
Since version 4.0.13 there's the commandline option -a to force use of
+, |, - for line drawing (only available when compiled with SLang).
Use this -a option if any of the suggestions below doesn't help.
In general, there are three subcases:
* Lines are shown as ASCII characters like this
+---------+
| |
+---------+
This also happens when you use the -a option. Other than that possible
reason is 1, 2 or 3 (see below).
* Lines are shown as lower case characters like this
lqqqqqqqqqk
x x
mqqqqqqqqqj
Possible reason is 2 or 3 (see below).
* Lines are shown as blanks or missing characters. Possible reason
is 3 or 4 (see below).
The reason for the problem is one of following:
1. Your curses library might not support line drawing characters.
Slang, Ncurses and System V curses do support them, BSD curses
doesn't. MC uses Slang by default so this is not usually a
problem.
2. Your terminal might not support line drawing characters. Vt100
compatible terminals, rxvt, xterm and color_xterm do support them.
3. Your terminfo or termcap database might have missing or incorrect
definations for line drawing characters. Set the acsc variable in
the terminfo database like this:
acsc=a\376k\277l\332m\300j\331n\305w\302v\301u\264t\303q\304x\263h
\2600\333
Don't forget issue 'tic' command. This supposes you are using pc
character set. The octal values might be different for other
character sets. If you are using termcap instead of terminfo, you
should modify above solution appropriately.
4. Your terminal font might not support line drawing characters. Try
changing the font.
Here is Miguel's answer to Torben on this subject.
Torben:
When I load consolefonts/iso01.f16, I get perfectly right national
characters, but the line drawing characters in mc get wrong. Is it
a mc problem, or is it a problem with the font? (I guess it is).
Is there a trick?
Miguel:
First of all, we should determine whether the font has line drawing
characters or not.
If it has line drawing characters, then a new terminfo entry should
be written for this specific case. Let's call this linux-iso01. The
acsc variable should be modified to reflect which characters are
used to do the line drawing.
If it does not have line drawing characters, then we should get rid
of the switch to acsc sequences and make the acsc sequence be just
a mapping to the ugly +, -, |, - characters.
You can get your terminfo definition by running the infocmp
program, making the proper changes and running the tic program to
compile your new terminfo database.
4.3 Can one use latin-1 characters without losing the lines?
Yes, you need a correct font and a correct termcap/terminfo database.
For font, if you use xterm try "xterm -fn fixed".
For termcap/terminfo database, change the acsc capability in the
database.
4.4 I have problems with entering/viewing national characters!
Upgrade to version 4.0.12 or newer.
From the Options - Display Bits dialog select Full 8 bits or ISO
8859-1. In addition, select 8 bit input from the same dialog.
4.5 How can I get colors?
Invoke mc like this (without quotes): "mc -c".
If you get colors, be happy.
If your terminal stays black and white, your terminal doesn't support
color. You might want to upgrade to a terminal which compatible with
the ANSI color sequences.
If your terminal goes compelety black, see the next question.
More detailed answer:
First, check that your terminal supports color. Color_xterm, rxvt and
Linux console do support, most other terminals don't. You can test
color support with following simple C program:
#include <stdio.h>
int main (void){
printf ("\033[32m Hello world! \033[m\n");
return 0;
}
Compile and run it. If you see "Hello world!" text in green your
terminal supports color, otherwise not (however, for color_xterm see
also the next question).
Second, check that you are using Ncurses or the Slang library (type
"mc -V" to find out), in addition some System V curses implementations
do support color, most don't.
With Slang library you can force color support by setting the
environment variable COLORTERM to any value.
Third, if you use ncurses library, check that your terminfo database
supports color. If not you should install one of the enhanced terminfo
databases included in the Midnight Commander source distribution.
Fourth, you might want to set the TERM environment variable so that
you use the correct terminfo database or termcap entry.
If you use color_xterm (or rxvt) the correct value might be
xterm-color, xtermc or simply xterm.
If you use Linux console the correct value for TERM is linux or
console.
4.6 My color_xterm goes completely (or partially) black!
Some color_xterm terminals define all colors as black instead of the
standard ANSI colors. This makes them go completely black when you try
to use Midnight Commander with colors.
You will have to override the defaults. Create a file "color.defaults"
which has the following contents:
color_xterm*color0: Black
color_xterm*color1: Red
color_xterm*color2: Green
color_xterm*color3: Yellow
color_xterm*color4: Blue
color_xterm*color5: Magenta
color_xterm*color6: Cyan
color_xterm*color7: White
color_xterm*background: White
color_xterm*foreground: Black
(replace color_xterm with the name of your color_xterm, color_xterm
mentions its name in its title bar)
Now type:
xrdb -merge color.defaults
Alternatively you can add the suggested contents of the color.defaults
file to your .Xdefaults or .Xresources file (or what ever the name of
your X configuration file is). Or you can replace your non-ANSI
color_xterm with an ANSI color_xterm.
4.7 Where can I get color_xterm?
Try ftp.x.org: /contrib/utilities/colour_xterm.tar.gz.
Alternatively, rxvt is a better choice, see
http://mc.blackdown.org/cgi-mc/download/rxvt/.html
4.8 I got colors working with MC but the other programs don't work at all
anymore!
Midnight Commander uses terminfo database (if available) but many
other programs use termcap database. If you set the TERM environment
variable to a value which has no corresponding entry in termcap
database those programs stop working. You should add the new value of
TERM to the termcap database.
Example: If you have set TERM to xterm-color locate from /etc/termcap
the line which starts:
xterm|vs100|xterm terminal emulator
Change it to start:
xterm|xterm-color|vs100|xterm terminal emulator
4.9 Why are there both terminfo and termcap? Wouldn't one database be enough?
You might want to read the Unix-haters handbook at
http://www.digital.de/people/jmh/Unix_Haters/unix-haters.html. It
lists many more reasons why Unix sucks.
You can configure which terminal database you want to use with the
"--with-termcap" and "--with-terminfo" flags of configure. If you
don't specify them, the configure script will try to use terminfo if
available otherwise it will use termcap.
5 Graphical user interface
5.1 Xview and Tk editions?
Get the newest development version, give the "--with-xview" or
"--with-tk" option to the configure and otherwise compile as usual.
See Download.
Xview and Tk editions are work in progress, they are not as robust as
the text mode edition.
6 Command line problems
6.1 How do I stay in the last directory when I exit Midnight Commander?
See the description of the -P option in the Options section of the
manual.
6.2 How can I access command line history?
You can browse previous commands with M-p and M-n. Alternatively, you
can summon the command history listbox by pressing F9 c h.
6.3 How can I complete commands, file names, variable names and so on?
Just press M-Tab. Press M-Tab again to get a listbox if there are
multiple possible completions.
6.4 [NEW] I am using ksh. Can I use functions defined in the .kshrc within
MC?
Sorry, MC only supports bash, tcsh and zsh functions. Ksh functions
are not supported because ksh lacks the necessary hooks needed for
subshell integration.
Switch to bash or zsh. They are both quite compatible with ksh. Your
ksh functions should work as such or after minimal changes.
6.5 [NEW] Is there any way to include additional options or hot keys to MC?
Yes, F2 invokes an user menu which fully configurable. You can add any
shell commands to the user menu. See
http://mc.blackdown.org/mc/manual-d.html#8 for more info.
Another way to add functionality is the external panelize feature. See
http://mc.blackdown.org/mc/manual-d.html#4 for more info.
And finally, you can code any feature you want yourself. MC source
code is free which means you can change it anyway you want. There are
some limitations to make sure MC stays free. See GNU General Public
License for details.
7 Virtual file systems
Note! Virtual file systems are supported by Unix ports only. The
Windows 95/NT and OS/2 ports do NOT support virtual file systems. This
means you haven't got ftp, zip or tar support on Windows 95/NT and
OS/2.
7.1 How can I see the contents of a tar archive?
If you use keyboard just move the selection bar on the tar file and
press enter.
If you use mouse just doubleclick on the tar file.
If these procedures don't work, your .mc.ext file is faulty. Replace
it with one from the MC source distribution.
You can also enter a tar archive by typing "cd tar:filename.tar.gz"
where filename.tar.gz is the name of the archive.
The recognized suffixes for tar archives are .tar, .tar.gz and .tgz.
If your tar archive uses different suffix you have to rename it.
7.2 How do I get out of a tar archive?
Just press enter on the toplevel ".." file or chdir to a non-tar
directory. Just typing "cd" with no parameters is enough (it will take
you to your home directory).
7.3 How do I do anonymous ftp with MC?
Just type "cd ftp://hostname" where hostname is the name of the host
you want to connect. Alternatively, select FTP link from the Left or
Right menu and type the name of the host you want to connect.
7.4 How do I do non-anonymous ftp with MC?
Non-anonymous ftp works just like the anonymous ftp but you give the
login name with the host name. For example, type "cd
ftp://username@hostname".
7.5 How do I close an ftp connection?
Just chdir to a non-ftp directory. Just typing "cd" with no parameters
is enough (it will take you to your home directory).
Internally Midnight Commander closes ftp connection only after a
timeout. This isn't visible to the end user.
7.6 Why aren't the contents of ftp panel updated?
Update is skipped because there would be a serious performance
penalty. Constantly updating directory panels through a ftp connection
would take too much time.
You can use C-r to force an update.
7.7 [NEW] What kind of proxy server works with Midnight Commander?
Midnight Commander only supports ftp-like ftp proxies. Common WWW
proxies (like Squid) are not supported yet because they make ftp
connections look like http connections.
8 Other common problems
8.1 [UPDATED] How do I get the internal editor to work?
The F4 key defaults to an external editor because thats what most
people are used to. To use the internal editor, select Configuration
from the Options menu and check the 'use internal edit' option.
Alternatively add the line
use_internal_edit=1
under the [Midnight-Commander] section in your .mc.ini file (which is
in your home directory).
To make the editor work all the time, go to the default/* section in
the file lib/mc/mc.ext file and remove the line
Edit=%var{EDITOR:vi} %f
The internal editor will now be invoked for anything not specified
elsewhere in the mc.ext file.
Make sure that you edit the correct mc.ext file. The Midnight
Commander first checks the existance of $HOME/.mc.ext. If this file is
missing MC will use $prefix/lib/mc/mc.ext instead ($prefix can be
changed with configure before compilation and it defaults to
/usr/local).
When you run `F9/Command/Extension file edit' for the very first time
Midnight Commander copies the system-wide mc.ext from $prefix/lib/mc
into your home directory because you need write access in order to
change it.
And please don't forget that "make install" overwrites
$prefix/lib/mc/mc.ext.
8.2 Why doesn't "mcedit newfile" work?
This is a known bug.
If the newfile doesn't exist, mcedit fails.
Start mcedit with no parameters, this will create a blank file. Then
save the file with whatever name you like.
8.3 [UPDATED] Is there any way to 'bookmark' favourite ftp-fs links?
Use the directory hotlist. Just press control-backslash. If your
national keyboard layout doesn't have backslash key, just press the
control key with the key which is the backslash key in the English
keyboard layout.
8.4 When copying the directories lose their original date, uid and gid!
This is a known bug. At moment only files preserve their original
settings when copying, not directories.
Uid and gid is fixed since 4.0.1. "Preserve UIDs/GIDs" in the copy
dialog needs to be checked and you must be root.
Date problem is supposed to be fixed with 4.0.13.
8.5 [UPDATED] Why I keep getting: "There is no disk in the drive. Please
insert a disk into drive D:"?
This is a known bug of the Windows 95/NT and OS/2 ports. MC looks its
configuration files from the D:\MC directory and if the D: drive is a
removable drive (like a CD ROM drive) and there is no disk in drive
you get this message everytime you try to do anything.
Since version 4.0.6 you can specify the actual location of the
Midnight Commander configuration files with the MCHOME environment
variable.
8.6 [NEW] When I start Midnight Commander, nothing happens!
First, invoke MC without subshell support: "mc -u". If this helps
check the shell you are using. Subshell support works best with bash
although tcsh and zsh are also supported. You might want to upgrade
your shell to a newer version. If you use something else than bash,
tcsh or zsh, subshell support is disabled automatically.
If disabling subshell doesn't help, try to reconfigure MC with
"--with-our-slang" and "--with-termcap" options and recompile. If this
helps, there is something wrong with your terminfo database or shared
slang library. For better terminfo databases see chapter 4. For a
better slang library, upgrade to a newer version or keep using the
"--with-our-slang" option.
8.7 [NEW] When I try to view a file MC hangs!
This is known bug. A quick fix is "chmod 666 /dev/tty". For a more
complete fix, see http://mc.blackdown.org/mc/maillist/97-10/98.html.
This bug will probably be fixed in 4.1.6.
9 Development
9.1 Who has written Midnight Commander?
Midnight Commander was started by Miguel de Icaza and he is the
maintainer of the package. Other authors have joined the project
later:
* Mauricio Plaza (early releases, retired)
* Janne Kukonlehto (joined Sep 27 1994, retired Mar 8 1995, nowadays
Janne is the webmaster of the Midnight Commander web site)
* Radek Doulik (joined Oct 30 1994)
* Fred Leeflang (joined Nov 2 1994)
* Dugan Porter (joined Dec 1 1994)
* Jakub Jelinek (joined Feb 8 1995)
* Ching Hui (joined Jun 27 1995)
* Andrej Borsenkow (joined Jul 1996)
* Paul Sheer (joined Nov 1 1996)
* Norbert Warmuth
* Alex I. Tkachenko
Alessandro Rubini has been specially helpful with debugging and
enhancing of the mouse support. John Davis has made his S-Lang library
available to us and answered many questions about it.
The photographs of the authors are available as:
http://mc.blackdown.org/mc/about.html
Many people have contributed bug reports, feature suggestions and
small code bits (alphabetical order):
* Thomasz Cholewo
* Juan Jose Ciarlante
* Alexander Dong (OS/2 port, NT port updates)
* Erwin van Eijk
* Torben Fjerdingstad
* Massimo Fontanelli
* Juan Grigera (NT port)
* Gerd Knorr
* Sergey Ya. Korshunoff
* Jean-Daniel Luiset
* Wim Osterholt
* Antonio Palama (old DOS port)
* Thomas Pundt
* Marcelo Roccasalva
* Ilya Rybkin
* Vadim Sinolits
* Jon Stevens
* Adam Tla/lka
9.2 Do I dare to use a development version?
I am afraid you have to answer to this question yourself. Development
versions seldom cause data loss but they have usually got many bugs.
It's up to you to judge whether new features outweight the bugs.
9.3 How can I report a bug/request for a feature?
You might first want to get the newest development version to see if
the bug is fixed or the feature is added already.
Send your report/request to mc-devel@roxanne.nuclecu.unam.mx or
mc@roxanne.nuclecu.unam.mx. These mailing lists are the most certain
way to contact the developers. Remember to mention if you are not on
the mailing list to make sure that you will receive a copy of replies.
Give as much details as possible. A too long message is a lot better
than a too short message.
For segmentation faults a stack backtrace is appreciated. You can
produce stack backtrace as follows:
* If segmentation fault produced a core file:
1. Load the core file by typing "gdb mc core" or "dbx mc core".
2. Type "where".
3. Cut and paste the results to your message.
* If segmentation fault didn't produce a core file:
1. Load mc by typing "gdb mc" or "dbx mc".
2. Start mc by typing "run".
3. Try to reproduce the segmentation fault by doing whatever you
did last time when the segmentation fault occurred.
4. Type "where".
5. Cut and paste the results to your message.
6. For the future you might want to check out what is the
command in your shell to allow producing of the core files.
Usually it is "limit coredumpsize unlimited" or "ulimit
coredumpsize" or "ulimit -c unlimited".
9.4 How can I join the development?
To join the development just code the feature you want to add and send
your patch for inclusion. Email address is mc-devel@nuclecu.unam.mx.
Before you start coding check the latest development version. It might
be that your feature has already been implemented.
Note that the authors of the Midnight Commander have given all their
rights on the program to the Free Software Foundation. You will have
to do the same if you contribute non-trivial patches. Otherwise we
have to reject your patches in order to avoid copyright problems.
10 More information
10.1 [UPDATED] This document didn't answer my question. Where else can I look
for an answer?
Read messages from the Discussion (mailing list archive), search the
web site or read the Manual.
Upgrade to a newer version of Midnight Commander. Many problems are
fixed in the new versions.
If you still can't find an answer, post your question to the Midnight
Commander mailing list. Its address is mc@nuclecu.unam.mx.
10.2 What mailing lists are there for Midnight Commander?
Following mailing lists discuss about Midnight Commander:
mc
General discussion of the Midnight Commander
mc-digest
The mc list, in digest format
mc-announce
Major announcements about the Commander
mc-patch
The latest Commander patches
mc-devel
Technical development discussion
mc-chat
Non-MC related chatting by the developers (contact Miguel to
subscribe)
To subscribe, send e-mail to majordomo@roxanne.nuclecu.unam.mx with
the following line in the body of the message:
subscribe <list-name> [optional-address]
Replace <list-name> with the name of the list you want to subscribe
and [optional-address] with your email address.
10.3 Where should I look on the World Wide Web for MC stuff?
There is a WWW page for Midnight Commander. The URL is:
http://mc.blackdown.org/mc/
The WWW page features MC screen shots, photographs of the authors,
mailing list archive and a few other things.
10.4 Are the mailing lists archived anywhere?
The mc and mc-devel lists are archived on the World Wide Web page (see
the previous question). Other lists are not currently archived though
Miguel keeps a private archive. Contact him if you want copies of past
messages.
11 Administrivia
11.1 Authorship
Questions and Answers is written by Janne Kukonlehto. Parts of it
originate from Ian Jackson, Miguel de Icaza, Dugan Porter, Norbert
Warmuth and Paul Sheer.
11.2 [UPDATED] File formats
This document is available in HTML, postscript and PDF formats at
http://mc.blackdown.org/mc/answers0.html.
This document is available in ASCII format in the Midnight Commander
source package.
11.3 Feedback is invited
Send your comments about this document to janne@mc.blackdown.org
Send your comments about the Midnight Commander to mc@nuclecu.unam.mx
11.4 Disclaimer and copyright
Note that this document is provided as is. The information in it is
not warranted to be correct; you use it at your own risk.
You can use Questions and Answers according to GNU Public License (see
the COPYING file in the Midnight Commander source distribution).
Questions and Answers is not public domain.
__________________________________________________________________
This document is maintained by Janne Kukonlehto
<janne@mc.blackdown.org>.

523
INSTALL Normal file
View File

@ -0,0 +1,523 @@
-*-text-*-
This file contains:
- Installation instructions and notes for the Midnight Commander
- Where to get more information on the Midnight Commander
- Common problems
- Information on porting the program
- Obtaining the missing pieces of the Midnight Commander
Installation instructions for the Midnight Commander
----------------------------------------------------
The `configure' shell script attempts to guess correct values for
various system-dependent variables used during compilation, and creates
the Makefile. It also creates a file `config.status' that you can run
in the future to recreate the current configuration.
(Nextstep users, make sure you read the "Compiling under Nextstep"
section)
To compile this package:
1. Configure the package for your system.
Normally, you just `cd' to the directory containing the package's
source code and type `./configure'. If you're using `csh' on an old
version of System V, you might need to type `sh configure' instead to
prevent `csh' from trying to execute `configure' itself (under AIX,
you may need to use ksh instead of sh).
Running `configure' takes a while. While it is running, it
prints some messages that tell what it is doing. If you don't want to
see any messages, run `configure' with its standard output redirected
to `/dev/null'; for example, `./configure >/dev/null'.
To compile the package in a different directory from the one
containing the source code, you must use a version of `make' that
supports the `VPATH' variable, such as GNU `make'. `cd' to the
directory where you want the object files and executables to go and run
the `configure' script. `configure' automatically checks for the
source code in the directory that `configure' is in and in `..'. If
for some reason `configure' is not in the source code directory that
you are configuring, then it will report that it can't find the source
code. In that case, run `configure' with the option `--srcdir=DIR',
where DIR is the directory that contains the source code.
By default, `make install' will install the package's files in
`/usr/local/bin', `/usr/local/man', etc. You can specify an
installation prefix other than `/usr/local' by giving `configure' the
option `--prefix=PATH'. Alternately, you can do so by consistently
giving a value for the `prefix' variable when you run `make', e.g.,
make prefix=/usr/gnu
make prefix=/usr/gnu install
You can specify separate installation prefixes for
architecture-specific files and architecture-independent files. If
you give `configure' the option `--exec-prefix=PATH' or set the `make'
variable `exec_prefix' to PATH, the package will use PATH as the
prefix for installing programs and libraries. Data files and
documentation will still use the regular prefix. Normally, all files
are installed using the same prefix.
The program detects if you have the gpm library installed. If you
installed the gpm mouse library in a non-standard place, you will need
to use the --with-gpm-mouse flag with the directory base where you
installed the gpm package.
`configure' also recognizes the following options:
`--help'
Print a summary of the options to `configure', and exit.
`--quiet'
`--silent'
Do not print messages saying which checks are being made.
`--verbose'
Print the results of the checks.
`--version'
Print the version of Autoconf used to generate the `configure'
script, and exit.
`--with-debug'
Enables the built-in memory allocation debugger and forces
compilation with -Wall. This is an option intended to be used by
the program developers.
`--without-edit'
Configures the program to be compiled without the built-in file
editor. The built-in editor is compiled in by default.
`--with-ext2undel=PATH'
On systems that use the Extended 2 file system and have the
libext2fs.a library available, this compiles into the Midnight
Commander the support code for recovering deleted files (the
undel virtual file system).
`--with-gpm-mouse[=PATH]'
Use this flag if your GPM mouse package cannot be detected by the
configure. Use =PATH if it is installed in a non-standard place.
The configure will append `lib' and `include' to find the libgpm.a
and gpm.h files respectively.
`--without-gpm-mouse'
Use this flag to disable GPM mouse support (e.g. if you want to
use mouse only on X terminals).
`--with-hsc'
Compiles support into the ftp virtual file system to support the
HSC firewall.
`--with-mmap'
Needed when compiling under AIX if you want the fast viewer.
`--with-sco'
This option is used to compile on SCO: it turns on SCO-specific
code, i.e. disables the terminal resizing mechanism, uses the
BSD-like pseudoterminal handling, adds screen-saving capabilities
on console, etc.
`--with-subshell[=optional]', `--without-subshell'
The subshell support is by default turned on, you can disable
this by using the --without-subshell option. If you pass the
=optional parameter, then the subshell support is turned off by
default, to turn it on, you have to specify the `-U' flag when
running the program.
`--with-termnet'
Enables the network support with the Term package.
`--with-tk' [WARNING: X code is not released]
This option enables including the Tcl/Tk version.
`--with-tk-includes=DIR' [WARNING: X code is not released]
Lets you specify the place where you have your Tcl/Tk headers installed.
It should be a directory containing tcl.h and tk.h.
`--with-tk-libraries=DIR' [WARNING: X code is not released]
Lets you specify the place where you have your Tcl/Tk libraries -
libtcl and libtk.
`--with-xview' [WARNING: X code is not released]
This option enables including the XView version.
`--with-xview-includes=DIR' [WARNING: X code is not released]
Lets you specify the place where you have your xview headers installed.
It should be the directory, which has subdirectories xview and
hopefuly xview_private.
`--with-xview-libraries=DIR' [WARNING: X code is not released]
Lets you specify the place where you have your xview libraries -
libolgx and libxview.
`--with-xv-bindir=DIR' [WARNING: X code is not released]
Lets you specify the place where program mxc will be installed.
Default is somewhere in your XView binaries directory,
$OPENWINHOME/bin.
`--without-dusum'
This option disables a feature of the Midnight Commander, which is
forking the du command with the -s option when you want to calculate
directory sizes.
`--without-vfs'
This option disables the Virtual File System switch code in the
Midnight Commander and uses the standard file system calls for
file access. If you specify this option you will not get the
transparent tar File system manipulation as well nor the
networked Midnight Commander file system.
You may also tell configure which display manager you want to use with
the Midnight Commander. The configure script will use SLang as default,
but you can override this by using any of the following flags (please
note that slang is included as part of the distribution),
`--with-slang' (default)
This is used to configure the program to use the SLang screen
manager. This is included as part of the Midnight Commander,
you don't need it installed on your system.
Slang is the only library that will let you resize the Midnight
Commander window on an xterm.
This option will usually try to use the terminfo database if it
is available, otherwise it will use the termcap database. At
compile time, you may force the use the terminal database with
the `--with-termcap' and `--with-terminfo' options.
`--with-ncurses[=directory]'
Use this flag (either with or without the =directory part), if
you want to compile with ncurses instead of the default SLang.
Use the =directory part if your ncurses is not installed in any of the
places configure will check (/usr/include, /usr/include/ncurses,
/usr/local/include and /usr/local/include/ncurses).
The argument to this flag is the base directory where the ncurses
files are located. The configure will append lib and include to
find the libncurses.a and ncurses.h file respectively. For
example, if you have installed ncurses under /gnu/lib and
/gnu/include, you specify: --with-ncurses=/gnu
You will need the ncurses package only if your system does not
provide a compatible curses. If after compiling, the program
says that it can't resolve the has_colors function, then you need
the ncurses package or you may always go back to the included SLang
screen manager.
`--with-vcurses[=directory]'
Use this flag to force the Midnight Commander to use a SystemV
type ncurses, the optional directory specifies where should
the C compiler find the include files.
`--with-sunos-curses'
You use this flag on SunOS machines if you want to use SunOS 4.x
curses instead of ncurses. You don't need this flag if you don't
have ncurses installed: it's only needed to force the usage of
SunOS curses over ncurses.
`configure' also accepts and ignores some other options.
On systems that require unusual options for compilation or linking
that the package's `configure' script does not know about, you can give
`configure' initial values for variables by setting them in the
environment. In Bourne-compatible shells, you can do that on the
command line like this:
CC='gcc -traditional' LIBS=-lposix ./configure
On systems that have the `env' program, you can do it like this:
env CC='gcc -traditional' LIBS=-lposix ./configure
Here are the `make' variables that you might want to override with
environment variables when running `configure'.
For these variables, any value given in the environment overrides the
value that `configure' would choose:
- Variable: CC
C compiler program. The default is `cc'.
- Variable: CFLAGS
The default flags used to build the program.
- Variable: INSTALL
Program to use to install files. The default is `install' if you
have it, `cp' otherwise.
For these variables, any value given in the environment is added to
the value that `configure' chooses:
- Variable: LIBS
Libraries to link with, in the form `-lfoo -lbar...'.
If you need to do unusual things to compile the package, we encourage
you to figure out how `configure' could check whether to do them, and
mail diffs or instructions to the address given in the README so we
can include them in the next release.
2. Type `make' to compile the package.
3. If the package comes with self-tests and you want to run them,
type `make check'. If you're not sure whether there are any, try it;
if `make' responds with something like
make: *** No way to make target `check'. Stop.
then the package does not come with self-tests.
4. Type `make install' to install programs, data files, and
documentation.
If your system is Linux, then install installs the Linux console screen
saver as well.
5. You can remove the program binaries and object files from the
source directory by typing `make clean'. To also remove the
Makefile(s), the header file containing system-dependent definitions
(if the package uses one), and `config.status' (all the files that
`configure' created), type `make realclean'. If you want to clean the source
tree completely, so that it contains only those files that should be
packaged in the archive, issue `make distclean'. If you've run configure in
a different directory than the source tree, distclean won't remove your *.o
and linked programs in that directory.
6. The Midnight Commander allows you to be kept on the directory you
were when you quit the program, this is done with a shell function,
the man page has more information about this. If you want to let the
install program make the change to your /etc/profile or your
~/.profile or ~/.bashrc, then type: `make mcfninstall'.
The file `configure.in' is used to create `configure' by a program
called `autoconf'. You only need it if you want to regenerate
`configure' using a newer version of `autoconf'.
Compiling under NeXTStep
------------------------
These instructions were provided by Gregor Hoffleit
<flight@mathi.uni-heidelberg.DE>, he recommends configuring the
program like this:
export CC="cc -posix"
configure --without-subshell --with-termcap
Edie config.h and make sure you have #undef HAVE_GETWD
make
- Where to get more information on the Midnight Commander
---------------------------------------------------------
Janne Kukonlehto set up a WWW page, here is the URL:
http://mc.blackdown.org/mc/
We also a set of mailing lists for the program:
mc-announce: Announcements of new version of the Midnight Commander.
mc-digest: Digest version of the mc list.
mc-patches: Patches by mail (also on the ftp site).
mc: Discussion on the Midnight Commander file manager.
mc-devel: For discussion between the developers of the program.
to subscribe to the mailing lists, send a message to:
majordomo@roxanne.nuclecu.unam.mx
with the following text in the body of the message:
subscribe <list-name> [address]
The address is optional and list-name is one of the above list names
(mc, mc-announce, mc-patches or mc-digest).
Notes about the Midnight Commander installation
------------------------------------------------
The Midnight Commander has been run in the following configurations:
i386-*-linux
sparc-*-linux
alpha-*-linux
mips-dec-ultrix4.3
mips-dec-{open,net}bsd1.0
mips-sgi-irix5.2
mips-sgi-irix5.3
rs6000-ibm-aix3.2.5
sparc-sun-sunos4.1
sparc-sun-netbsd1.0
sparc-sun-solaris2.3
hppa-hp-hpux9
hppa-hp-hpux7
m68k-apple-aux
mc88110-aviion-dgux5.4
i386-*-{bsdi2,freebsd}
Since the Midnight Commander is configured via the GNU autoconf
program, it's not difficult to run it in other operating systems.
If you're using AIX, with the cc6000 compiler, you have to specify the
`--with-mmap' command line option.
You will need GNU C (or an ANSI C Compiler) and optionally a color
curses library (ncurses is a good choice). The Midnight Commander now
comes with the Slang screen manager, a fast screen manager, so ncurses
is not required anymore unless you want to use it.
Many Linux systems ship with ncurses version 1.9.9e, however, we recommend
ncurses 4.1 or above, since the former version does not support resizing
of the xterm window.
Since version 0.9 the Midnight Commander comes with mouse support on
xterms and in the Linux console. In order to take advantage of the
mouse support on the Linux console you will need the gpm mouse server
(see the section "Obtaining the Missing Pieces" in this file).
Once you get the Mouse Server, compile it and install it, then you
will have to specify the `--with-gpm-mouse' flag to the configure
program if you installed it in a non-standard directory. If you
installed the gpm package under /usr or /usr/local, you don't need to
specify this flag; configure will find gpm for you. The support for
mice on xterms is always compiled in.
We are working on further enhancements to the program, but we're not
sure which ones must go first. If you would like to point us in the
Right Direction we will be glad to hear from you (you could check the
file TODO included with this distribution for the current projects).
If you happen to find an undocumented feature that doesn't do what you
expected, please drop us a note telling us as much as you can about
the problem you're experiencing (to miguel@roxanne.nuclecu.unam.mx).
Porting the program
-------------------
Random notes on porting to other architectures.
The Midnight Commander uses now by default the Slang library for
handling the display. If you can't port Slang (which should be a
pretty trivial job), you may want to attempt using ncurses (the
Midnight Commander can use ncurses as well as the display engine).
If you don't want to install ncurses and your OS is a SystemV Release
4 variant, maybe the curses supplied with your system will do the
work. If you experience display problems, then it means that we are
dealing with a buggy implementation of curses. You have two options:
one, download ncurses and recompile with ncurses or recompile all your
source code with the symbol BUGGY_CURSES defined. But you can always
switch to the default SLang screen manager.
The fast way to do this is to:
make clean; make XINC=-DBUGGY_CURSES
Obtaining the missing pieces of the Midnight Commander
------------------------------------------------------
The Midnight Commander will build without requiring you to get any
other software packages, however, you may be interested in enhancing
the Midnight Commander environment with some of these:
o Terminal database
There are many incomplete terminal databases out there, however, a
complete terminfo is bundled with ncurses. (It is simple to generate
the termcap database using the infocmp utility in ncurses).
Some terminfo data are included with the mc distribution (lib/*.ti).
Particularly linux, xterm and vt100. Use e.g. ''tic linux.ti'' to
use them.
If you want to run mc on xterm/color_xterm/ansi_xterm (not rxvt), then
you might read lib/README.xterm for further information.
o In the past the Midnight Commander required the NCurses library to
build, now it's optional. You can get Ncurses from
ftp.gnu.org:/pub/gnu
ftp.clark.net:/pub/dickey/ncurses
o The GPM Mouse Server is available at:
iride.unipv.it:/pub/gpm
o The X Windows System libraries are only used if you are going to
build the X11 versions of the program. Please note that this code
is not finished, so it's only useful if you want to look at what we
are doing or want to help in one of the two X11 versions.
o The XView library can be obtained from (currently the newest is
XView3.2p1-X11R6.tar.gz):
ftp.nuclecu.unam.mx:/Midnight/devel/XView.libs
ftp.x.org:/contrib/libraries
ftp.cvut.cz:/pub/x11/contrib/libraries
- Linux/ELF shared binaries:
sunsite.unc.edu:/pub/Linux/libs/X/xview
ftp.cvut.cz:/pub/linux/sunsite/libs/X/xview
o The Tcl/Tk libraries can be obtained from:
ftp.smli.com:/pub/tcl
ftp.aud.alcatel.com:/tcl/ftp.smli.com
ftp.cvut.cz:/pub/tcl/ftp.smli.com
- Linux/ELF shared binaries:
ftp.ods.com:/pub/linux
ftp.cvut.cz:/pub/linux/ods
o The Xpm library (used by the XView version) can be obtained from
(currently xpm-3.4f.tar.gz):
koala.inria.fr:/pub/xpm
ftp.x.org:/contrib/libraries
ftp.cvut.cz:/pub/x11/contrib/libraries
- Linux/ELF shared binaries:
ftp.ctd.comsat.com:/pub/linux/ELF
ftp.cvut.cz:/pub/linux/comsat
To get the mouse support working on the Linux console:
If you're using Linux version >= 1.1.34, then you will have to choose yes
to selection when you compile your kernel. If your Linux version is
older than this one, you may try to apply one of the patches included in
the gpm package.
And the GNU C Compiler may be obtained from the following sites:
ASIA: ftp.cs.titech.ac.jp, utsun.s.u-tokyo.ac.jp:/ftpsync/prep,
cair.kaist.ac.kr:/pub/gnu
AUSTRALIA: archie.au:/gnu (archie.oz or archie.oz.au for ACSnet)
AFRICA: ftp.sun.ac.za:/pub/gnu
MIDDLE-EAST: ftp.technion.ac.il:/pub/unsupported/gnu
EUROPE: ftp.cvut.cz:/pub/gnu, irisa.irisa.fr:/pub/gnu,
ftp.univ-lyon1.fr:pub/gnu, ftp.mcc.ac.uk,
unix.hensa.ac.uk:/pub/uunet/systems/gnu,
src.doc.ic.ac.uk:/gnu, ftp.win.tue.nl, ugle.unit.no,
ftp.denet.dk, ftp.informatik.rwth-aachen.de:/pub/gnu,
ftp.informatik.tu-muenchen.de, ftp.eunet.ch,
nic.switch.ch:/mirror/gnu, nic.funet.fi:/pub/gnu, isy.liu.se,
ftp.stacken.kth.se, ftp.luth.se:/pub/unix/gnu, archive.eu.net
CANADA: ftp.cs.ubc.ca:/mirror2/gnu
USA: wuarchive.wustl.edu:/mirrors/gnu, labrea.stanford.edu,
ftp.kpc.com:/pub/mirror/gnu, ftp.cs.widener.edu, uxc.cso.uiuc.edu,
col.hp.com:/mirrors/gnu, ftp.cs.columbia.edu:/archives/gnu/prep,
gatekeeper.dec.com:/pub/GNU, ftp.uu.net:/systems/gnu
Unsupported options to configure:
---------------------------------
`--with-bsd-curses'
If you don't want to use ncurses and are using an Ultrix box, you
can use this switch. Be aware that ncurses is a better option
than the curses included in Ultrix.

70
INSTALL.FAST Normal file
View File

@ -0,0 +1,70 @@
-*-text-*-
Read the INSTALL file for the complete instructions.
The Midnight Commander by default will use the Slang screen
manager, if something fails with the Slang screen manager, you may
compile the program with your system curses (You will need a SysV
compatible curses, in case you don't have such, read the README file
for directions on getting the ncurses package, a freely available
replacement for SysV curses).
1. Configure the package for your system.
Normally, you just `cd' to the package main directory and type
`./configure'.
The most often needed options to configure are following:
`--prefix=PATH'
By default, `make install' will install the package's files in
`/usr/local/bin', `/usr/local/man', etc. or to `/usr/bin',
`/usr/man', etc. depending on the location of an old mc binary.
If you have none in your system, default will be `/usr/local'.
You can specify an installation prefix other than default by giving
`configure' the option `--prefix=PATH'.
`--with-slang' (default)
The easy way to get the Commander running: Slang is part of
the distribution. This is the default screen manager, if you run
configure without any --with-*curses parameter.
`--with-ncurses[=PATH]'
Use the flag without =PATH if you want to compile with ncurses
(default is in version 3.0 the SLang screen manager included
in the distribution).
Use this flag with =PATH part, if you want to compile with ncurses
and your ncurses is not installed in any of the
places configure checks (/usr/include, /usr/include/ncurses,
/usr/local/include and /usr/local/include/ncurses). The
configure script will append `lib' and `include' to find the
libncurses.a and ncurses.h files respectively.
`--with-gpm-mouse[=PATH]'
Use this flag if your GPM mouse package cannot be detected by the
configure. Use =PATH if it is installed in a non-standard place.
The configure will append `lib' and `include' to find the libgpm.a
and gpm.h files respectively.
`--with-sco'
If you are compiling on a SCO machine.
You may also want to specify CFLAGS for the compiler, even if it finds
itself some defaults by typing e.g.
`CFLAGS=-O2 ./configure'
2. Type `make' to compile the package.
3. Type `make install' (as root) to install programs, data files, and
documentation. If you're on a Linux system, this will install the
`cons.saver' utility, which allows the Midnight Commander to save and
restore the screen contents. If you're making a mc binary distribution for
other people and want to tar the whole binary later, you may want to specify
`make install DESTDIR=PATH', which will make PATH the root for installation
(but in the installed stuff will be still stored only --prefix).
3a. Type `make mcfninstall' to get an interactive program check if you
want to define an useful alias for the Midnight Commander.
4. Type `mc' and enjoy!

101
Make.common.in Normal file
View File

@ -0,0 +1,101 @@
VERSION=4.1.27
SHELL = /bin/sh
# This variable makes it possible to move the installation root to another
# directory. This is useful when you're creating a binary distribution of mc.
# If empty, normal root will be used.
# You can run e.g. 'make install DESTDIR=/packages/mc/3.0' to accomplish
# that.
# DESTDIR = /opt/apps/mc/$(VERSION)
# Installation target directories & other installation stuff
prefix = @prefix@
exec_prefix = $(prefix)
binprefix =
manprefix =
bindir = $(exec_prefix)/bin
libdir = $(exec_prefix)/lib/mc
suppbindir = $(libdir)/bin
tidir = $(libdir)/term
extfsdir = $(libdir)/extfs
icondir = $(libdir)/icons
mandir = $(prefix)/man/man1
manext = 1
man8dir = $(prefix)/man/man8
man8ext = 8
xv_bindir = @xv_bindir@
# Tools & program stuff
SEDCMD = @SEDCMD@
SEDCMD2 = @SEDCMD2@
STRIP = @STRIP@
@SET_MAKE@
CC = @CC@
CPP = @CPP@
AR = @AR@
RANLIB = @RANLIB@
RM = @RM@
RMF = @RM@ -f
MV = @MV@
CP = @CP@
LN_S = @LN_S@
AWK = @AWK@
AWK_VAR_OPTION = @AWK_VAR_OPTION@
# Flags & libs
# No way, to make make happy (except GNU), we cannot use := to append
# something to these, so that's why there is a leading _
XCFLAGS = @CFLAGS@
XCPPFLAGS = @CPPFLAGS@ -I.. -DBINDIR=\""$(bindir)/"\" -DLIBDIR=\""$(libdir)/"\" -DICONDIR=\""$(icondir)/"\" $(XINC)
XLDFLAGS = @LDFLAGS@
XDEFS = @DEFS@
XLIBS = @LIBS@
# Where do we have the sources?
# You shouldn't have to edit this :)
mcsrcdir = $(rootdir)/src
docdir = $(rootdir)/doc
datadir = $(rootdir)/lib
slangdir = $(rootdir)/slang
vfsdir = $(rootdir)/vfs
xvdir = $(rootdir)/xv
tkdir = $(rootdir)/tk
gnomedir = $(rootdir)/gnome
icodir = $(rootdir)/icons
hpath = -I$(mcsrcdir) -I$(slangdir) -I$(vfsdir) -I$(xvdir) -I$(xvdir)/support/xview_private -I$(tkdir)
# Rules
first_rule: all
@PHONY@ all check cross TAGS clean install uninstall distcopy depend dep
@PHONY@ fastdep fastdepslang fastdepvfs fastdeploc slowdep
@PCENTRULE@../slang/%.o : ../slang/%.c
@PCENTRULE@ cd ../slang; $(MAKE) libmcslang.a
@PCENTRULE@../vfs/%.o : ../vfs/%.c
@PCENTRULE@ cd ../vfs; $(MAKE) libvfs.a
fastdep: dummy
if test x"`echo $(srcdir)/*.[ch]`" != x'$(srcdir)/*.[ch]'; then { cd $(srcdir); $(AWK) -f $(mcsrcdir)/depend.awk $(AWK_VAR_OPTION) hpath="$(hpath)" $(AWK_VAR_OPTION) srcdir="$(srcdir)" *.[ch];} > .depend; fi
-$(MAKE) fastdeploc
@WRITEDEP@
fastdepslang:
@PCENTRULE@ { { { cd ../slang; $(MAKE) showlibdep;} | grep OBJS; cat .depend;} | { cd $(slangdir); $(AWK) -f $(mcsrcdir)/depend.awk $(AWK_VAR_OPTION) dolib="../slang libmcslang.a" $(AWK_VAR_OPTION) hpath="$(hpath)" $(AWK_VAR_OPTION) srcdir="$(slangdir)";};} >> .depend
fastdepvfs:
@PCENTRULE@ { { { cd ../vfs; $(MAKE) showlibdep;} | grep OBJS; cat .depend;} | { cd $(vfsdir); $(AWK) -f $(mcsrcdir)/depend.awk $(AWK_VAR_OPTION) dolib="../vfs libvfs.a" $(AWK_VAR_OPTION) hpath="$(hpath)" $(AWK_VAR_OPTION) srcdir="$(vfsdir)";};} >> .depend
slowdep: dummy
if test x"`echo $(srcdir)/*.[ch]`" != x'$(srcdir)/*.[ch]'; then \
$(CPP) -M $(CPPFLAGS) $(DEFS) $(CFLAGS) $(srcdir)/*.c > .depend; fi
@WRITEDEP@
mcdep: @dep@
dummy:
# End of Make.common

126
Makefile.in Normal file
View File

@ -0,0 +1,126 @@
srcdir = @srcdir@
VPATH = @srcdir@
rootdir = $(srcdir)
@MCFGR@@MCF@
foreigndirs=nt os2
unixdirs=vfs lib doc slang edit src tk xv gnome icons
alldirs=$(unixdirs) $(foreigndirs)
subdirs=$(alldirs)
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
DISTMAIN = configure configure.in NEWS README INSTALL INSTALL.FAST \
Makefile.in FAQ COPYING create_vcs install-sh \
config.h.in aclocal.m4 acconfig.h VERSION mcfn_install.in \
Make.common.in README.NT mc.spec.in mc.spec README.OS2 \
VERSION.in
all:
@for dir in ${unixdirs}; do \
cd $$dir; \
${MAKE} all || exit 1; \
cd .. ;\
done
static:
$(MAKE) _LDFLAGS="-static $(_LDFLAGS)"
configure: configure.in aclocal.m4
cd $(srcdir); autoconf --localdir=$(srcdir) $(srcdir)/configure.in > configure
chmod 755 configure
config.h.in: configure.in acconfig.h
cd $(srcdir); autoheader
install: installdirs @vcs@
@for I in $(unixdirs); do cd $$I; $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1; cd ..; done
$(INSTALL_DATA) $(srcdir)/FAQ $(DESTDIR)$(libdir)/FAQ
$(INSTALL_PROGRAM) mcfn_install $(DESTDIR)$(suppbindir)/mcfn_install
chmod +x $(DESTDIR)$(suppbindir)/mcfn_install
@echo "Please verify that the configuration values are correctly"
@echo "set in the mc.ext file in $(libdir)"
install.create_vcs:
$(INSTALL_PROGRAM) $(srcdir)/create_vcs $(DESTDIR)$(suppbindir)/create_vcs
if test x$(DESTDIR) = x; then $(SHELL) $(srcdir)/create_vcs; fi
installdirs:
$(mcsrcdir)/xmkdir $(DESTDIR)$(bindir) $(DESTDIR)$(libdir)
$(mcsrcdir)/xmkdir $(DESTDIR)$(mandir) $(DESTDIR)$(man8dir)
$(mcsrcdir)/xmkdir $(DESTDIR)$(icondir) $(DESTDIR)$(suppbindir)
$(mcsrcdir)/xmkdir $(DESTDIR)$(tidir) $(DESTDIR)$(extfsdir)
mcfninstall:
-/bin/sh ./mcfn_install
uninstall:
@for I in $(unixdirs); do cd $$I; $(MAKE) $@ || exit 1; cd ..; done
-$(RMF) $(DESTDIR)$(libdir)/FAQ
-$(RMF) $(DESTDIR)$(suppbindir)/mcfn_install
@echo Midnight Commander uninstalled
cross TAGS clean depend dep:
@for I in $(unixdirs); do cd $$I; $(MAKE) $@ || exit 1; cd ..; done
Makefile:
$(SHELL) config.status
config.status:
if test -x config.status; then config.status --recheck; \
else $(SHELL) configure; fi
realclean: clean
rm -f *~
rm -f config.cache
# distclean goal is for making a clean source tree, but if you have run
# configure from a different directory, then doesn't destroy all your
# hardly compiled and linked stuff. That's why there is always $(srcdir)/
# In that case most of those commands do nothing, except cleaning *~
# and cleaning source links.
distclean:
rm -f $(srcdir)/*~ $(srcdir)/config.cache $(srcdir)/config.h
rm -f $(srcdir)/config.log $(srcdir)/config.status
rm -f $(srcdir)/mcfn_install
@for I in $(alldirs); do cd $$I; $(MAKE) $@ || exit 1; cd ..; done
rm -f $(srcdir)/Makefile $(srcdir)/Make.common
rm -f lib/mc.ext mcfn_install vfs/extfs/ftplist vfs/extfs/zip vfs/extfs/zoo vfs/extfs/lslR vfs/extfs/lha vfs/extfs/cpio vfs/extfs/deb vfs/extfs/rar
distdirs:
mkdir ../mc-$(VERSION); \
mkdir ../mc-$(VERSION)/src; \
mkdir ../mc-$(VERSION)/lib; \
mkdir ../mc-$(VERSION)/doc; \
mkdir ../mc-$(VERSION)/slang; \
mkdir ../mc-$(VERSION)/vfs; \
mkdir ../mc-$(VERSION)/vfs/extfs; \
mkdir ../mc-$(VERSION)/icons; \
mkdir ../mc-$(VERSION)/xv; \
mkdir ../mc-$(VERSION)/xv/support; \
mkdir ../mc-$(VERSION)/xv/support/xview_private; \
mkdir ../mc-$(VERSION)/tk; \
mkdir ../mc-$(VERSION)/gnome; \
mkdir ../mc-$(VERSION)/nt; \
mkdir ../mc-$(VERSION)/po; \
mkdir ../mc-$(VERSION)/edit;
distcopy:
sed "s/@VERSION@/$(VERSION)/" mc.spec.in > mc.spec
sed "s/@VERSION@/$(VERSION)/" VERSION.in > VERSION
cp $(DISTMAIN) ../mc-$(VERSION);
cp po/Makefile.in.in ../mc-$(VERSION)/po;
cp po/POTFILES.in ../mc-$(VERSION)/po;
for I in $(alldirs); do \
cd $$I ; \
$(MAKE) distcopy || exit 1; \
cd ..; done
(cd ..; tar cvf - mc-$(VERSION) | \
gzip -f9 > mc-$(VERSION).tar.gz); \
dist: configure config.h.in distdirs distcopy

516
NEWS Normal file
View File

@ -0,0 +1,516 @@
Version 3.5
- New hotlist code.
- The bookmark code has been completely revamped and now it supports
folders. New format for the hot list file.
- It is possible to copy a selected path name into the input line
(C-Enter).
- Tk enhancements.
- New built in GUI designer to help developers modify the look
of the program at run time (no penaly for users).
- Many dialog boxes now work.
- Right button now pops up a context sensitive action menu.
- Added many visual enhancements.
- The Tk edition is not yet finished though.
- File management.
- Now we do background copy and move operations.
(you can ftp your files in the background now, for example).
- Built in text editor
- This is an easy to use text editor with pull-down menus.
The features it presently supports are: Block copy, move,
delete, cut, paste; key for key undo; file insertion; macro
definition; regular expression search and replace (and our
own scanf-printf search and replace); shift-arrow MSW-MAC
text highlighting (for the linux console only);
insert-overwrite toggle; and an option to pipe text blocks
through shell commands like indent.
Comes with Emacs keybindings as well.
mcedit is a link to mc which bring it up in editor mode.
- FTP File system
- Many fixes and enhacements, better support for proxy
machines.
- Now we support both active and passive opens.
- Estimated time of arrival for ftp transfers.
- stalled detection.
- Much better support for proxies.
- ftp URL's now allow a password to be provided.
- ext2fs Undelete File system
- Minor enhancements.
- TAR File system
- Now we flush the tarfs if the tar file has been modified
- External File systems:
- Speeded up RPM file system.
- New LHA file system.
- New ARC file system.
- New DEB file system (for those users of Debian).
- New RAR file system.
- Fixed problems with different zipfs.
- MC file system:
- We get can use a mc file system by using either mc: or mc:// prefixes.
- Viewer changes:
- Now we include a program that preprocesses mail if you view it
so, you get colored mails in the viewer.
- A simple ruler has been implemented (press Alt-r to enable it).
- New hex editor
- Now you can do hex editions in your files with a single keystroke.
(invoke it by using the hex-viewer and then clicking on edit).
- Find file command:
- Now we can search inside files using a piped grep (particularly
interesting to search inside virtual file system: tar files,
tar files on remote ftp sites, or searching information on an
ftp site)
- Widgets:
- Input lines now support control-left, control-right movement on the
Linux console.
- Extension file:
- We now support extra entries in a given rule with the Include=
tag.
- Ports:
- Windows NT, Windows 95 by Juan Grigera
- OS/2 by Alexander Dong.
- Many many many bug fixes and memory leaks have been fixed.
Version 3.2
- External File system:
- Mtools file system works.
- New Cpio file system.
- New RPM file system.
- FTP file system:
- support for HSC firewall
- Lots of subshell fixes
- Regexp-extension:
- Editing of non-local files works now.
- Bunch of bug fixes.
- Panelize now works properly.
- Can work on Nextstep now.
- Windows NT port by Juan Grigera.
- Midnight Commander file system server:
- Fixed errno handling in the server.
- Fixed time handling in the server.
- Better caching.
- Works with PAM if supported on the system.
Version 3.1
This has been finished:
- Enhanced ftpfs:
- Displays progress bars.
- Supports netware and windows nt servers
- Better support for symlinked files.
- Handles those warez sites file names.
- Increase the directory cache timeout.
- Cache flushing (C-r)
- If you append a /~ to the directory, you will log into your home
directory (this is done by default if you use the menus to connect).
- More robust.
- Subshell fixes (it should not hang any longer).
- Fixes prompt handling for zsh and tcsh users.
- Fixes variable expansion for tcsh (now you may edit files).
- Rewrote the sync code between the parend and child, should not hang
any longer.
- Better command completion.
- Keypad handling enhanced:
- Special key treatment for +, -, \ and now may be configure to
only take place if you do not have a command typed in.
- Now the + and \ bindings when ran on the Linux console work
may use the keypad and M-+ and M-\ and leave the + and \ keys
free.
- Better handling of the line drawing chars on OSF/1 and AIX.
- Enhanced tar/compressed tar file systems.
- Global kill ring.
- Added undelete feature for Linux systems: now you may recover deleted files
on ext2 file systems with the Undelete file system.
- Symlink commands (for symlink lovers).
see the docs on C-x C-r, C-x C-l, C-x C-s keystrokes.
- New macros:
%b and %B return the basename of the selected filename
%var{ENV-VAR} expands to the contents of ENV-VAR variable.
- MC may be invoked as a viewer (mc -f flag).
- Added Unicode support on the Linux console (run with mc -N)
- Tons of bug fixes, the code is cleaner and hopefully
- Allow a vfs pathname to be passed as a startup directory.
This is a list of people that put their effort into making the 3.1
release:
Adam Tla/lka, Antonio Palama, Carl Thompson, Ching Hui, Dugan Porter, Gerd
Knorr, Ilya Rybkin, Jakub Jelinek, Janne Kikonlehto, Juan Grigera, Juan Jose
Ciarlante, John Davis, Marcelo Fabian Roccasalva, Perry Francis Nguyen,
Sergey Ya Korshunoff Steven Hirsch, Thanh Ma and Torben Fjerdingstad.
Version 3.0
This has been finished:
- Virtual File System: You now can browse tar, compressed tar and
file systems over the network as if they were local subdirectories;
- Slang support, you don't need ncurses anymore (but you can still compile
with ncurses, if you want).
- New mc.ext format, for details see the sample mc.ext file provided.
- Append option if you try to copy/move a file onto already existing one.
- Internal cd command uses CDPATH variable if set (like in BASH).
- Find file command is much faster.
- External panelize command - finding files using unlimited number of
criteria - actually spawns an external command and it can be find, awk,
grep -l or anything else.
- Learn keys makes setting up of mc on terminals with broken
terminfo/termcap databases easier. It just asks you to press keys which
are not working.
- Advanced chown command.
- C-PgUp and C-PgDn takes you to the previous and currently selected
directory respectively on the Linux console.
- You can choose between 7 data bits, iso-latin-1 (0-127+160-255) or
other (0-255).
- Confirmation for overwriting, deleting and exiting added.
- Viewer has growing buffers.
- Filename, username, hostname and variable completion (M-Tab) on all
input lines plus command completion on appropriate places of command
line.
- Following of symlinks at changing directory.
- Viewer now supports bold faces and underlines, and it fits the
information on the screen better. Now you can also specify the starting
mode for the viewer depending on the contents of the viewed file.
- Mask rename and copy.
- Colors now let you specify the intensity of the colors you want.
This is being worked on:
- Virtual File System: FTP file system.
- Tcl/Tk and XView versions of the program (preliminary versions are
up and running).
Version 2.0
Now users are able to define their own display
- User defined display formats.
Now you can configure the file display to suit your needs.
For example, you can say which information you want to see displayed
instead of our defaults.
- User definable program layout.
Panels could be shown vertically or horizontally;
panels could be different sizes, you can hide or show most
program windows (command line, keybar or menubar).
- Output window.
Now, it's possible to see part of the last program output on the Linux
console without having to switch screens via an option in the layout
menu.
- New View modes:
Quick view: as you browse your files, each one is displayed on
the other panel on the idle time.
Tree view: let's you browse your directories by traveling a tree.
We have two traveling modes available. And the tree does
not take your precious time: it's build on the fly, as you
browse your disk (you can always loose your time if you
want to :-).
Info view: Gives you information on the currently select file and
the current file system as you move.
User view: Let's you define a directory listing and the format you
want to use.
- New subshell support (concurrent shell execution)
The Midnight Commander will now spawn one copy of the shell, so you
get better performance and you can use shell functions, define variables
and execute complete shell commands. Supported shells: bash, zsh and
tcsh. If your shell is not supported, then the old mode is still
available.
- Dialog box manager
Almost all the new configuration options are configured with this
new dialog manager, easy to use if you are familiar with dialog boxes
in DOS and Windows.
Available widgets: check buttons, buttons, radio buttons,
input lines and list boxes (So you can take our code and use it on
your applications).
- New option configuration.
Now the program options are configured with a dialog box.
- Chmod and Chown commands:
For changing permissions as well as ownership of files and
directories, uses our new dialog manager.
- Color customization support
Now you can change the default color of the program with any of
these:
environment variable, Colors section in the init file (colors per
terminal type) and command line.
- User menu and extension enhancements:
Execution understand the %t macro (tagged files).
User menu also has a new macro to let the user specify options.
You can hide and show entries in the user menus by using conditions.
Auto detect best match depending on a regexp.
- Viewer:
Goto line command,
horizontal scrolling,
on the fly uncompression (and we don't eat unneeded cycles of CPU),
allow non gunzip operation.
- Internal move command:
Now, we don't rely anymore on system commands in /bin, so the
program is more robust and is much faster. Bunchs of code come
from the GNU fileutils.
- The Tree view and normal views allows wrapped incremental searchs of
file names.
- Mask rename:
Now it's possible to do things like rename *.pas in *.bak
- Compare directories command
- Allow panels to be in Long mode without forcing the user to a single panel.
(You can even have two long panels).
- F10, C-g cancels as well as ESC ESC.
- Improved help system.
We updated and spelled the help system and added a lots of links.
The Web page is constructed with the same tools.
- Allows tagging of directories:
Now you can copy, rename, move and delete complete directories. You
are not limited anymore to files.
- View output (screen save/restore) on Linux console.
On old Linux systems, only b&w is supported, on newer Linux systems
(1.1.67 and newer), we also support color screen save/restore and
cursos positions.
- 8 bit clean support.
- Visual feedback while i-searching files.
- Much more intuitive, you have to use it.
- It's better than aspirin.
- New memory allocation debugger.
During testing time, we used a powerfull memory allocation debugger,
so the program will not eat all your memory, and will make a good use of
your memory.
- Now it also runs on hppa-hp-hpux9, hppa-hp-hpux7, m68k-apple-aux and
sparc-sun-netbsd1.0. The best platform to run it is Linux, of course,
since that's where most of us develop it.
- Inode sort option.
- Nice progress status indicator.
We have two of them: a moving dash indicator and a progress bar
indicator for file operations.
Version 0.15
- Uses GNU autoconf.
Currently, it has been ported to this configurations:
i386-*-linux1.0
i386-*-linux1.1
mips-sgi-irix5.2
mips-dec-ultrix4.3
rs6000-ibm-aix3.2.5
sparc-sun-sunos4.1
sparc-sun-solaris2.3
- Improvements to the internal file viewer:
Wrap/Unwrap mode.
Hex mode.
Hex searches.
Now you can view compressed files (gzip, compress, zip, pack and lzh).
Performance enhancements, now it's much faster.
Works on systems without mmap.
- Mouse Support now also works on xterms.
If you run in the Linux console, you will still need the gpm mouse server
to use the mouse support, but if you use xterms, then you're lucky
and can use the mouse support when using xterms.
- Help system and man page.
Both were updated and has many more hypertext links inside, the
help system can also be used with a mouse.
- If running on xterms, now you can see the output of the last program
you ran by using the C-o key combination.
- Switch panels command (C-u)
- With filter command per panel.
- With auto mounting/umounting on chdir feature.
- cd now expands tildes (~, ~user).
- Much more portable.
- Many bugs were fixed.
Version 0.14
- Now can handle directories with an unlimited number of files.
- New link and symlink commands (C-x l, C-x s).
- New insert tagged files or selection command (C-x t).
Version 0.13
- Behave more like the Norton Commander.
- Added menu file edit.
- If there is no permission to load a directory, now it loads a dummy
directory.
- When a panel is re-sorted, keep the selected file selected.
- forward_word and backward_word command on the input line now skip
over letters and numbers.
- Fixed backward scrolling in the internal viewer.
- The internal viewer now computes the percentage in a more natural
way.
- Added handling of the Home and End keys to the internal viewer
- Bug fixes.
Version 0.12
- Preliminary support for System V compilation.
- Bug fix: didn't call closedir in all cases.
- bug fixes.
Version 0.11
- Support cd -.
- Corrected Makefile.
Version 0.10
- Added new Alt-G, Alt-H, Alt-J to select the top file, middle file
and bottom file in the current panel.
- Now it's allowed to select option in query boxes by the first initial
- Fixed mouse repeat rate.
- Fixed a bug that prevent copying individual files to another file.
- Some minor bug fixes.
Version 0.9
- Mouse Support.
- Internal Copy command (it no longer uses cp).
- Verbose Copying of files.
- Confirmation on Overwrite and on Delete.
- Support reverse sorting.
- Many visual enhancements.
- Per panel options are saved and restored.
- New truncation of names in the panels.
- History in Input Lines (M-p and M-n).
- Input line enhancements.
- Dialog boxes are nicer than before.
- Cache in gid and uid translators.
- More keybindings for the Input lines.
- Better kill management in Input Lines.
- Bug fixes.
Version 0.8
- The online help now comes with the complete man page.
- Input lines now support M-b and M-f for movement by word.
- Unlimited input lines (command line).
- Filename searches now must be started with C-s or M-s.
- Many bug fixes.
Version 0.7
- The stat() reloading optimization is now a configuration option.
- Many bug fixes went to the find file command.
- New history in the hypertext viewer.
- ESC-Tab will copy the name of the other-panel selected file to the
input line.
- Now it's possible to display files and directories mixed together or
separated (like the Norton Commander).
- Many bug fixes, see the ChangeLog for details.
Version 0.6
- Extension dependent execution implemented (now you can execute
things like tar tzvf over compressed tar files, just a tap in the
Enter key).
- Added simple expansion of useful variables in the user menu.
- Avoid unnecessary reloading of subdirectories using stat (suggested
by Torben Fjerdingstad <tfj@olivia.ping.dk>).
- Added options to disable colors and display version number.
- Allow start up directory specification (ex: mc /usr/local/bin /tmp).
- Fixed bug that operated on the selection instead of the tagged file
(when only one file was tagged).
- Some cosmetic changes.
- Bug fixes.
Version 0.5
- Fixed bug in the help browser that crashed the program.
- New internal viewer.
- New long directory listing format.
- some bug fixes.
Version 0.4
- User Menus (F2 key).
- Quick search of files in a panel (Alt-filename takes you to that file).
- Char quoting (C-q).
- exec() enhancements.
- now you can suspend the program (C-z).
- The find file command now seems to be very stable.
- misc bug fixes.
Version 0.3
- Setup loading/saving.
- Support for any size screen.
- Many, many bug fixes.

191
README Normal file
View File

@ -0,0 +1,191 @@
-*-Text-*-
Contents:
---------
Intro text
Midnight Commander editions
Where to get more information
The Midnight Commander
Mini-docs
Obtaining the Midnight Commander
Reporting problems.
This is version 3.5 of the Midnight Commander, a free Norton Commander
Clone with many useful features. The Midnight Commander comes with
mouse support on xterms and optionally on the Linux console.
The Midnight Commander is a directory browsing tool which bears a
certain remote resemblance to John Socha's Norton Commander for DOS.
It is feature packed:
o Built in Virtual File System: manipulate remote files
systems through the ftp protocol or Midnight Commander's own
mcfs protocol. Browse tar, compressed tar files, rpm, zip,
cpio, lha and rar files with a single click.
o All of the Midnight Commander operations work with the virtual
file system, enabling you to do complex tasks.
o Mouse support on the Linux console and under X11's xterms.
o Learn Keys: The Midnight Commander may be configured at run
time to support any kind of input keys for a given terminal,
making its operation even on the most wierd terminals a
breeze.
o Text and hex editors are available for you to use.
o Hotlist allows you to keep a list of common visited
locations (including ftp sites).
o Command completion: By pressing Alt-Tab in any place where a
filename or an executable are expected, the Midnight Commander
will complete for you the name. If you quickly press Alt-Tab
twice you can get a listbox with the possible completions
available.
o Subshell support: Run your commands by a real shell
interpreter. The Midnight Commander interacts with bash, tcsh
and zsh to provide you with all of the facilities available in
your shell.
o Find file command can now search inside the contents of
files.
o Background operations allows you to copy or move files from
any virtual file system while you do other tasks (ie, you can
do background ftp copies).
o Proxy support with our ftpfs.
o Linux file recovery: If you are using Linux system, you can
recover deleted files from an ext2fs partition with the
undelete file system. This is a low level file recovery
function that will recover files deleted by any program in
Linux.
Please note that the undelete file system can only recover
12 file system blocks if the file was deleted with a kernel
in the 2.0.x series. The 2.1.x series have fixes this and you
can recover all of the file contents there.
o External panelization: You can run any arbitrary external
command and the Midnight Commander will display the output
generated as a file listing that can be manipulated as a
regular directory.
o Emacs like key bindings in all of our widgets.
o Powerfull context dependant actions are available.
o Powerfull built-in file viewer: The file viewer, together
with the context dependant actions is used to format man pages
on the fly, coloring mail messages and more.
Midnight Commander editions:
----------------------------
The Midnight Commander may be compiled into three different editions:
the text mode edition, the Tk edition and the XView edition. Please
note that currently the only supported edition is the text mode
edition. The Tk and XView editions are included with the tar file but
are not finished and thus not supported.
Where to get more information:
------------------------------
There is a mailing list for discussion on enhancing the program, future
directions and announcements; if you want to subscribe, send mail to:
majordomo@roxanne.nuclecu.unam.mx
There is a WWW page for the Midnight Commander with the URL:
<http://mc.blackdown.org/mc/>.
The Midnight Commander:
-----------------------
The Midnight Commander is released under the GNU General Public License
version 2.0 or any later version. A copy of the file is included with
this distribution package.
If you have comments, you can send them to me:
miguel@roxanne.nuclecu.unam.mx
or if it would benefit more people, to the mailing list:
mc@roxanne.nuclecu.unam.mx
Help develop and enhance free software.
Mini-documentation:
-------------------
o Use the F-Keys for invoking the commands in the function key bar.
If your terminal doesn't support F-keys, you can use the <ESC digit>
sequence to invoke the corresponding F-digit key.
o Tab changes the current panel.
o All input lines have emacs-like key-bindings (command history is
accessed through the M-p and M-n keys).
o The panels accept C-n, C-p for browsing the panel (like in emacs).
o M-Enter copies the currently selected file name to the input line.
o M-Tab completes the current word (or tries to).
o The Virtual File System is a cute addition to the project, you may
browse in tar and compressed tar files as well as browsing remote
machines with the mcfs file system.
o Please read the manual page.
o Read the file TODO for the current projects.
You can access the whole documentation online with the F1 key,
although it's not as nice as the groff printed manual page :-)
Where you may obtain the Midnight Commander
-------------------------------------------
The software should be available by anonymous ftp at sunsite.unc.edu
in the directory /pub/Linux/utils/file and at ftp.nuclecu.unam.mx
in the directory /linux/local.
The last alpha versions are available at ftp.nuclecu.unam.mx in the
directory /linux/local/devel.
European mirrors of both version 3.1 and alpha versions are available
at sunsite.mff.cuni.cz in the directory /GNU/mc and at ftp.teuto.de
in the directory /lmb/mc.
Reporting problems
------------------
Please, send a detailed description of your problem to the
mc-bugs@roxanne.nuclecu.unam.mx address.
Include the version of the program, the operating system that you are
using, the compielr and compiler flags used to compile the program (if
you know them), what kind of distribution you are using (if a
GNU/Linux system).
If the program crashed and produces a core dump, please provide a
stack trace of the program.
You can do this by running dbx or gdb like this:
gdb mc core
(gdb) where

126
README.NT Executable file
View File

@ -0,0 +1,126 @@
Midnight Commander for Windows NT and Windows '95
-------------------------------------------------
0. Hello
1. Compiling
2. Changes made
0. Hello
--------
Hello, this is the Midnight Commander port to Win32. It has many bugs, but is
quite stable now. Maybe you can help as an beta tester or as a programmer. In
either case you would like subscribe to mc-devel list
(see readme files in main doc on how to do this) and contact us.
1. Compiling
------------
1.1. Compiler
----------------
Microsoft Visual C++ for Windows NT (all versions, including 4.x) are supported.
In nt/makefile you can find an external makefile, and in nt/makefile.vc1.nt, vc4.nt
projects for the visual IDE. Two makefiles are add since the version 3.5.39. They
are produced from MS VC 4.x and are named as ntaxp.mak (for Windows NT AXP)
and ntint.mak (for Windows NT Intel). If you want to use them, you will have to
change the path coded in these two files.
Other compilers such as Watcom, or Borland tools should be quite
straightforward, but has not been tested.
Under Cygnus tools, apparently everything works just fine.
1.2. General issues
--------------------
Preprocessor
Define:
LIBDIR
_OS_NT - OS flag
OS2_NT - Flag for OS/2 and NT
HAVE_CONFIG_H - config.h flag
Includes:
So as to avoid chaos in include files, I decided to create some
fake includes for UNIX counterparts. The empty files you need to create are:
pwd.h grp.h
sys/param.h sys/time.h
1.3 Windowing Library
--------------------------------
Currently only support for S-lang windowing library is given. I know no curses
public library ported to Win32 consoles, and I think it is useless to port
it now. You may want to download the complete distribution it from
ftp://space.mit.edu/pub/davis.
2. Changes made
---------------
2.1. Changes to main code
-------------------------
They are enclosed in #ifdef _OS_NT or OS2_NT blocks.
Wrote something similar to statfs in UTIL.C
Wrote truncate.
Changed (almost) all references to "/" path slash with PATH_CHAR and strPATH_CHAR.
Changed name of CONTROL_FILE.
Changed name of shell and call to shell.
In some cases we supressed code. This is temporal (so that mc can compile). In
the future we will provide fake or true interfaces for these features.
- Links: creation and information on links are not supported in NT. We
should provide a fake interface for the local filesystem and
a true one for networked.
- GID/UID queries (get_user, owner, preserve UID/GID on copy, ...).
- TERMinals: all the code directly done with terminals must be supressed.
- Signals: deleted. Should support the native ones.
- pipes: had some trouble in ext.c and with error_pipes but soon will be fixed.
- Chown command: Not supported yet.
2.2. Files rewritten
--------------------
There are 3 files with so many changes that they have been moved to independent
archives (or OS dependent).
- Chmod.nt.c: this command will query and change attributes (hidden, system,
archive,...). Maybe we should write a real chmod (and also a
chown). It is not finished, but works almost fine. Look that
the stat st_mode member is filled with attributes, not modes.
- Cons.handler.nt.c: Supports same API as linux cons.handler.c. It allocates
a new console buffer and switches between the two when doing a
shell. The new allocated one is the used by Midnight commander.
(look that to make this we should also redirect standard handles)
- Key.nt.c: a static table maps Virtual Key codes to Curses-like Key codes.
Also mouse events are supported.
still preliminar.
- utilnt.c: Contains utilunix.c functions, with Win32 implementation
2.3. New files
--------------
- drive.nt.c: A Change Drive command has been implemented. Two lines
in main.c were included (in the left/right panel menus).
The funcs drive_cmd_a/b are implemented in this new file.
It will build a dialog with available drives as buttons.
bug: too many drives are not supported (think just 7). have
to rewrite to support more than one line.
- util.debug.c: developers-only utilities to trace Win32 API call error codes
- util.WinNT.c: Windows NT specific functions:
getuid(): Will check your priviledges and return 0 (root)
if you have Administrator priviledges.
- util.Win32.c: Windows NT & 95 utilities: (specific to Win32, no UNIX counterpart)
getEXEtype(): check if executable is CUI or GUI.
2.4. Changes made from me (Alexander Dong, ado@software-ag.de)
--------------------
I have hacked some codes for Windows NT AXP and NT Intel.
Drive.nt.c was rewritten for a beautiful Drive_Change dialog window.
All main source changed from me are marked with the comment /* .ado */.
I have also included two own Makefiles:
ntaxp.mak (for Windows NT Alpha) and
ntint.mak (for Windows 95/NT Intel).
You will have to change the path in these files before use them. They
are both for Microsoft Visual C++ 4.x.

108
README.OS2 Executable file
View File

@ -0,0 +1,108 @@
Midnight Commander for OS/2 -- version 3.5.42 (Development version)
-----------------------------------------------------------------------
May 26, 1997
This file contains special information for Midnight Commander for OS/2.
For more information about Midnight Commander, please read the original FAQ.
0. Hello
--------
This is the port of Midnight Commander to OS/2. I think it's now a
BETA version still with some unknown bugs, use it as your own risk!
1. Installation Instructions for binaries
------------
The default installation position for the binary files is D:\MC, just copy
all the files there and set the PATH to D:\MC. A small REXX program install.cmd
will help you create a desktop icon. With this version, using -S switch will
produce a batch file for you to change the directory to the last working place
upon exit. The batch file nc.cmd will demonstrate this feature.
2. Special notes
-----------
You can also change the drive with F11 and F12.
Known bugs:
- CTRL-C to external program not possible
- CTRL-O not work.
3. Operating System
-----------
I am using Warp 4 and IBM VisualAge C++ for this port. I don't think that
it is a problem to run it with OS/2 2.x, but I can not verify it.
Please drop me a mail and tell me how it works with the other OS versions.
4. How to compile it
-----------
VisualAge C++ 3.0 was used for this port. You can recompile the program
with the following steps:
0. The source files are located in D:\work\mc\mc-3.5.xx\. You will have to
replace this string with your location in the makefiles.
Goto \work\mc\mc-3.5.xx:
1. Copy all the files from os2\ into src\.
2. Install Slang 0.99.38. (ftp://space.mit.edu/pub/davis)
Patch Slang to make it works with Midnight Commander.
(I have disabled the multithreaded key handling because the key
control will be done in MC)
3. Copy the os2edit\ files to edit\.
Use Makefile.release to build a released version of libedit.lib or
Makefile.debug for a debug version.
4. Goto src\.
If you are going to use the WorkFrame for rebuild the makefile,
you have to delete the following files from src\:
achown.c
chmod.c
chown.c
cons.handler.c
cons.saver.c
cons.saver.h
fixhlp.c
key.c
key.unx.c
learn.c
learn.h
mad.c
Makefile.in
man2hlp.c
mfmt.c
slint.c
utilunix.c
xcurses.c
Otherwise, just type
nmake /f makefile.release (for release version)
nmake /f makefile.debug (for debug version)
4.1 Changes to main code:
They are enclosed in "#if defined(__os2__)" or OS2_NT blocks. Because of the
diffences between OS/2 and the other OSs, some of the files are completely
rewritten with call to APIs. They are named as *.os2.[ch].
5. Contact Information
-----------
Because of limited time and resources, this program has not been
thoroughly tested. Please report bugs (only those special under OS/2)
and comments via e-mail to:
ado@software-ag.de
----
Alexander Dong

1
VERSION Normal file
View File

@ -0,0 +1 @@
#define VERSION "4.1.27"

1
VERSION.in Normal file
View File

@ -0,0 +1 @@
#define VERSION "@VERSION@"

237
acconfig.h Normal file
View File

@ -0,0 +1,237 @@
/* This is the configuration file for the Midnight Commander. It was generated
by autoconf's configure.
Configure for Midnight Commander
Copyright (C) 1994, 1995 Janne Kukonlehto
Copyright (C) 1994, 1995 Miguel de Icaza
Copyright (C) 1995 Jakub Jelinek
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You 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. */
#include <VERSION>
@TOP@
/* Always defined */
#undef D_INO_IN_DIRENT
#undef IS_AIX
#undef MOUNTED_FREAD
#undef MOUNTED_FREAD_FSTYP
#undef MOUNTED_GETFSSTAT
#undef MOUNTED_GETMNT
#undef MOUNTED_GETMNTENT1
#undef MOUNTED_GETMNTENT2
#undef MOUNTED_GETMNTINFO
#undef MOUNTED_VMOUNT
#undef STAT_STATFS2_BSIZE
#undef STAT_STATFS2_FSIZE
#undef STAT_STATFS2_FS_DATA
#undef STAT_STATFS3_OSF1
#undef STAT_STATFS4
#undef STAT_STATVFS
/* Does your system provide the umode_t typedef? */
#undef umode_t
/* Does the file command accepts the -L option */
#undef FILE_L
/* Does the file command work well with - option for stdin? */
#undef FILE_STDIN
/* Does the grep command work well with - option for stdin? */
#undef GREP_STDIN
/* Is the program using the GPM library? */
#undef HAVE_LIBGPM
/* Is the program using the distributed slang library? */
#undef HAVE_SLANG
/* Is the program using a system-installed slang library? */
#undef HAVE_SYSTEM_SLANG
/* Define if the slang.h header file is inside a directory slang
** in the standard directories
*/
#undef SLANG_H_INSIDE_SLANG_DIR
/* Does the program have subshell support? */
#undef HAVE_SUBSHELL_SUPPORT
/* If you don't have gcc, define this */
#undef OLD_TOOLS
/* Are you using other type of curses? */
#undef OTHER_CURSES
/* Is the subshell the default or optional? */
#undef SUBSHELL_OPTIONAL
/* Use SunOS SysV curses? */
#undef SUNOS_CURSES
/* Use old BSD curses? */
#undef USE_BSD_CURSES
/* Use SystemV curses? */
#undef USE_SYSV_CURSES
/* Use Ncurses? */
#undef USE_NCURSES
/* If you Curses does not have color define this one */
#undef NO_COLOR_SUPPORT
/* Support the Midnight Commander Virtual File System? */
#undef USE_VFS
/* Support for the Memory Allocation Debugger */
#undef HAVE_MAD
/* Extra Debugging */
#undef MCDEBUG
/* If the Slang library will be using it's own terminfo instead of termcap */
#undef SLANG_TERMINFO
/* If Slang library should use termcap */
#undef USE_TERMCAP
/* If you have socket and the rest of the net functions use this */
#undef USE_NETCODE
/* If defined, use .netrc for FTP connections */
#undef USE_NETRC
/* If your operating system does not have enough space for a file name
* in a struct dirent, then define this
*/
#undef NEED_EXTRA_DIRENT_BUFFER
/* Define if you want the du -s summary */
#undef HAVE_DUSUM
/* Define if your du does handle -b correctly */
#undef DUSUM_USEB
/* Define to size of chunks du is displaying its information.
* If DUSUM_USEB is defined, this should be 1
*/
#define DUSUM_FACTOR 512
/* Define this one if you want termnet support */
#undef USE_TERMNET
/* Defined if you have the file command */
#undef HAVE_FILECMD
/* Defined if you have libXpm, <X11/xpm.h>, libXext, <X11/extensions/shape.h> */
#undef HAVE_XPM_SHAPE
/* Defined if you have shadow passwords on Linux */
#undef LINUX_SHADOW
/* Defined if you have the crypt prototype in neither unistd.h nor crypt.h */
#undef NEED_CRYPT_PROTOTYPE
/* Defined if your CPP understands ## macro token pasting method */
#undef HAVE_PORTABLE_TOKEN_PASTING
/* Define if you want to turn on SCO-specific code */
#undef SCO_FLAVOR
/* Define if your system has struct linger */
#undef HAVE_STRUCT_LINGER
/* Define if your curses has this one (AIX, OSF/1) */
#undef USE_SETUPTERM
/* Link in ext2fs code for delfs experimental file system */
#undef USE_EXT2FSLIB
/* Define if you have putenv routine */
#undef HAVE_PUTENV
/* Define if you have isascii */
#undef HAVE_ISASCII
/* Define if you want to use the HSC firewall */
#undef HSC_PROXY
/* Define if your system uses PAM for auth stuff */
#undef HAVE_PAM
/* Define if you have the pmap_getmaps function */
#undef HAVE_PMAP_GETMAPS
/* Define if you have the <sys/select.h> header file. */
#undef HAVE_SYS_SELECT_H
/* Define if you have the get_process_stats function and have to use that instead of gettimeofday */
#undef HAVE_GET_PROCESS_STATS
/* Define if you want to call the internal routine edit() for the editor */
#undef USE_INTERNAL_EDIT
/* Define if your system has socketpair */
#undef HAVE_SOCKETPAIR
/* Do we have posix signals? */
#undef HAVE_SIGACTION
#undef HAVE_SIGPROCMASK
#undef HAVE_SIGEMPTYSET
#undef HAVE_SIGADDSET
/* Version of ncurses */
#undef NCURSES_970530
@BOTTOM@
#ifdef HAVE_LIBPT
# define HAVE_GRANTPT
#endif
#if defined(HAVE_LIBCRYPT) || defined(HAVE_LIBCRYPT_I)
# define HAVE_CRYPT
#endif
#ifdef HAVE_XVIEW
# include <xvmain.h>
#endif
#if defined(HAVE_SIGADDSET) && defined(HAVE_SIGEMPTYSET)
# if defined(HAVE_SIGACTION) && defined(HAVE_SIGPROCMASK)
# define SLANG_POSIX_SIGNALS
# endif
#endif
#ifdef __os2__
# define OS2_NT 1
# define S_ISFIFO(x) 0
#endif
#ifdef _OS_NT
# define OS2_NT 1
#endif
#ifndef OS2_NT
/* some Unices do not define this, and slang requires it: */
#ifndef unix
# define unix
#endif
#endif

1182
aclocal.m4 vendored Normal file

File diff suppressed because it is too large Load Diff

508
config.h.in Normal file
View File

@ -0,0 +1,508 @@
/* config.h.in. Generated automatically from configure.in by autoheader. */
/* This is the configuration file for the Midnight Commander. It was generated
by autoconf's configure.
Configure for Midnight Commander
Copyright (C) 1994, 1995 Janne Kukonlehto
Copyright (C) 1994, 1995 Miguel de Icaza
Copyright (C) 1995 Jakub Jelinek
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You 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. */
#include <VERSION>
/* Define if on AIX 3.
System headers sometimes define this.
We just want to avoid a redefinition error message. */
#ifndef _ALL_SOURCE
#undef _ALL_SOURCE
#endif
/* Define if using alloca.c. */
#undef C_ALLOCA
/* Define to empty if the keyword does not work. */
#undef const
/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems.
This function is required for alloca.c support on those systems. */
#undef CRAY_STACKSEG_END
/* Define to `int' if <sys/types.h> doesn't define. */
#undef gid_t
/* Define if you have alloca, as a function or macro. */
#undef HAVE_ALLOCA
/* Define if you have <alloca.h> and it should be used (not on Ultrix). */
#undef HAVE_ALLOCA_H
/* Define if you have the getmntent function. */
#undef HAVE_GETMNTENT
/* Define if you have a working `mmap' system call. */
#undef HAVE_MMAP
/* Define if your struct stat has st_blksize. */
#undef HAVE_ST_BLKSIZE
/* Define if your struct stat has st_blocks. */
#undef HAVE_ST_BLOCKS
/* Define if your struct stat has st_rdev. */
#undef HAVE_ST_RDEV
/* Define if you have <sys/wait.h> that is POSIX.1 compatible. */
#undef HAVE_SYS_WAIT_H
/* Define if major, minor, and makedev are declared in <mkdev.h>. */
#undef MAJOR_IN_MKDEV
/* Define if major, minor, and makedev are declared in <sysmacros.h>. */
#undef MAJOR_IN_SYSMACROS
/* Define if on MINIX. */
#undef _MINIX
/* Define to `int' if <sys/types.h> doesn't define. */
#undef mode_t
/* Define to `long' if <sys/types.h> doesn't define. */
#undef off_t
/* Define to `int' if <sys/types.h> doesn't define. */
#undef pid_t
/* Define if the system does not provide POSIX.1 features except
with this defined. */
#undef _POSIX_1_SOURCE
/* Define if you need to in order for stat and other things to work. */
#undef _POSIX_SOURCE
/* If using the C implementation of alloca, define if you know the
direction of stack growth for your system; otherwise it will be
automatically deduced at run-time.
STACK_DIRECTION > 0 => grows toward higher addresses
STACK_DIRECTION < 0 => grows toward lower addresses
STACK_DIRECTION = 0 => direction of growth unknown
*/
#undef STACK_DIRECTION
/* Define if you have the ANSI C header files. */
#undef STDC_HEADERS
/* Define to `int' if <sys/types.h> doesn't define. */
#undef uid_t
/* Always defined */
#undef D_INO_IN_DIRENT
#undef IS_AIX
#undef MOUNTED_FREAD
#undef MOUNTED_FREAD_FSTYP
#undef MOUNTED_GETFSSTAT
#undef MOUNTED_GETMNT
#undef MOUNTED_GETMNTENT1
#undef MOUNTED_GETMNTENT2
#undef MOUNTED_GETMNTINFO
#undef MOUNTED_VMOUNT
#undef STAT_STATFS2_BSIZE
#undef STAT_STATFS2_FSIZE
#undef STAT_STATFS2_FS_DATA
#undef STAT_STATFS3_OSF1
#undef STAT_STATFS4
#undef STAT_STATVFS
/* Does your system provide the umode_t typedef? */
#undef umode_t
/* Does the file command accepts the -L option */
#undef FILE_L
/* Does the file command work well with - option for stdin? */
#undef FILE_STDIN
/* Does the grep command work well with - option for stdin? */
#undef GREP_STDIN
/* Is the program using the GPM library? */
#undef HAVE_LIBGPM
/* Is the program using the distributed slang library? */
#undef HAVE_SLANG
/* Is the program using a system-installed slang library? */
#undef HAVE_SYSTEM_SLANG
/* Define if the slang.h header file is inside a directory slang
** in the standard directories
*/
#undef SLANG_H_INSIDE_SLANG_DIR
/* Does the program have subshell support? */
#undef HAVE_SUBSHELL_SUPPORT
/* If you don't have gcc, define this */
#undef OLD_TOOLS
/* Is the subshell the default or optional? */
#undef SUBSHELL_OPTIONAL
/* Use SunOS SysV curses? */
#undef SUNOS_CURSES
/* Use SystemV curses? */
#undef USE_SYSV_CURSES
/* Use Ncurses? */
#undef USE_NCURSES
/* If you Curses does not have color define this one */
#undef NO_COLOR_SUPPORT
/* Support the Midnight Commander Virtual File System? */
#undef USE_VFS
/* Support for the Memory Allocation Debugger */
#undef HAVE_MAD
/* Extra Debugging */
#undef MCDEBUG
/* If the Slang library will be using it's own terminfo instead of termcap */
#undef SLANG_TERMINFO
/* If Slang library should use termcap */
#undef USE_TERMCAP
/* If you have socket and the rest of the net functions use this */
#undef USE_NETCODE
/* If defined, use .netrc for FTP connections */
#undef USE_NETRC
/* If your operating system does not have enough space for a file name
* in a struct dirent, then define this
*/
#undef NEED_EXTRA_DIRENT_BUFFER
/* Define if you want the du -s summary */
#undef HAVE_DUSUM
/* Define if your du does handle -b correctly */
#undef DUSUM_USEB
/* Define to size of chunks du is displaying its information.
* If DUSUM_USEB is defined, this should be 1
*/
#define DUSUM_FACTOR 512
/* Define this one if you want termnet support */
#undef USE_TERMNET
/* Defined if you have libXpm, <X11/xpm.h>, libXext, <X11/extensions/shape.h> */
#undef HAVE_XPM_SHAPE
/* Defined if you have shadow passwords on Linux */
#undef LINUX_SHADOW
/* Defined if you have the crypt prototype in neither unistd.h nor crypt.h */
#undef NEED_CRYPT_PROTOTYPE
/* Define if you want to turn on SCO-specific code */
#undef SCO_FLAVOR
/* Define if your system has struct linger */
#undef HAVE_STRUCT_LINGER
/* Define if your curses has this one (AIX, OSF/1) */
#undef USE_SETUPTERM
/* Link in ext2fs code for delfs experimental file system */
#undef USE_EXT2FSLIB
/* Define if you want to use the HSC firewall */
#undef HSC_PROXY
/* Define if your system uses PAM for auth stuff */
#undef HAVE_PAM
/* Define if you have the get_process_stats function and have to use that instead of gettimeofday */
#undef HAVE_GET_PROCESS_STATS
/* Define if you want to call the internal routine edit() for the editor */
#undef USE_INTERNAL_EDIT
/* Define if your system has socketpair */
#undef HAVE_SOCKETPAIR
/* Version of ncurses */
#undef NCURSES_970530
/* Define if you have the cfgetospeed function. */
#undef HAVE_CFGETOSPEED
/* Define if you have the crypt function. */
#undef HAVE_CRYPT
/* Define if you have the getmntinfo function. */
#undef HAVE_GETMNTINFO
/* Define if you have the getpagesize function. */
#undef HAVE_GETPAGESIZE
/* Define if you have the getwd function. */
#undef HAVE_GETWD
/* Define if you have the grantpt function. */
#undef HAVE_GRANTPT
/* Define if you have the initgroups function. */
#undef HAVE_INITGROUPS
/* Define if you have the keyok function. */
#undef HAVE_KEYOK
/* Define if you have the memcpy function. */
#undef HAVE_MEMCPY
/* Define if you have the memmove function. */
#undef HAVE_MEMMOVE
/* Define if you have the memset function. */
#undef HAVE_MEMSET
/* Define if you have the pmap_getmaps function. */
#undef HAVE_PMAP_GETMAPS
/* Define if you have the pmap_getport function. */
#undef HAVE_PMAP_GETPORT
/* Define if you have the pmap_set function. */
#undef HAVE_PMAP_SET
/* Define if you have the putenv function. */
#undef HAVE_PUTENV
/* Define if you have the pwdauth function. */
#undef HAVE_PWDAUTH
/* Define if you have the resizeterm function. */
#undef HAVE_RESIZETERM
/* Define if you have the rresvport function. */
#undef HAVE_RRESVPORT
/* Define if you have the sigaction function. */
#undef HAVE_SIGACTION
/* Define if you have the sigaddset function. */
#undef HAVE_SIGADDSET
/* Define if you have the sigemptyset function. */
#undef HAVE_SIGEMPTYSET
/* Define if you have the sigprocmask function. */
#undef HAVE_SIGPROCMASK
/* Define if you have the socket function. */
#undef HAVE_SOCKET
/* Define if you have the socketpair function. */
#undef HAVE_SOCKETPAIR
/* Define if you have the statfs function. */
#undef HAVE_STATFS
/* Define if you have the statlstat function. */
#undef HAVE_STATLSTAT
/* Define if you have the statvfs function. */
#undef HAVE_STATVFS
/* Define if you have the strcasecmp function. */
#undef HAVE_STRCASECMP
/* Define if you have the strdup function. */
#undef HAVE_STRDUP
/* Define if you have the strerror function. */
#undef HAVE_STRERROR
/* Define if you have the strncasecmp function. */
#undef HAVE_STRNCASECMP
/* Define if you have the tcgetattr function. */
#undef HAVE_TCGETATTR
/* Define if you have the tcsetattr function. */
#undef HAVE_TCSETATTR
/* Define if you have the truncate function. */
#undef HAVE_TRUNCATE
/* Define if you have the valloc function. */
#undef HAVE_VALLOC
/* Define if you have the <crypt.h> header file. */
#undef HAVE_CRYPT_H
/* Define if you have the <dirent.h> header file. */
#undef HAVE_DIRENT_H
/* Define if you have the <ext2fs/ext2fs.h> header file. */
#undef HAVE_EXT2FS_EXT2FS_H
/* Define if you have the <fcntl.h> header file. */
#undef HAVE_FCNTL_H
/* Define if you have the <grp.h> header file. */
#undef HAVE_GRP_H
/* Define if you have the <limits.h> header file. */
#undef HAVE_LIMITS_H
/* Define if you have the <linux/ext2_fs.h> header file. */
#undef HAVE_LINUX_EXT2_FS_H
/* Define if you have the <malloc.h> header file. */
#undef HAVE_MALLOC_H
/* Define if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
/* Define if you have the <mntent.h> header file. */
#undef HAVE_MNTENT_H
/* Define if you have the <mnttab.h> header file. */
#undef HAVE_MNTTAB_H
/* Define if you have the <ndir.h> header file. */
#undef HAVE_NDIR_H
/* Define if you have the <rpc/pmap_clnt.h> header file. */
#undef HAVE_RPC_PMAP_CLNT_H
/* Define if you have the <shadow.h> header file. */
#undef HAVE_SHADOW_H
/* Define if you have the <shadow/shadow.h> header file. */
#undef HAVE_SHADOW_SHADOW_H
/* Define if you have the <slang.h> header file. */
#undef HAVE_SLANG_H
/* Define if you have the <slang/slang.h> header file. */
#undef HAVE_SLANG_SLANG_H
/* Define if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
/* Define if you have the <string.h> header file. */
#undef HAVE_STRING_H
/* Define if you have the <sys/dir.h> header file. */
#undef HAVE_SYS_DIR_H
/* Define if you have the <sys/dustat.h> header file. */
#undef HAVE_SYS_DUSTAT_H
/* Define if you have the <sys/filsys.h> header file. */
#undef HAVE_SYS_FILSYS_H
/* Define if you have the <sys/fs_types.h> header file. */
#undef HAVE_SYS_FS_TYPES_H
/* Define if you have the <sys/fstyp.h> header file. */
#undef HAVE_SYS_FSTYP_H
/* Define if you have the <sys/mount.h> header file. */
#undef HAVE_SYS_MOUNT_H
/* Define if you have the <sys/ndir.h> header file. */
#undef HAVE_SYS_NDIR_H
/* Define if you have the <sys/param.h> header file. */
#undef HAVE_SYS_PARAM_H
/* Define if you have the <sys/select.h> header file. */
#undef HAVE_SYS_SELECT_H
/* Define if you have the <sys/statfs.h> header file. */
#undef HAVE_SYS_STATFS_H
/* Define if you have the <sys/statvfs.h> header file. */
#undef HAVE_SYS_STATVFS_H
/* Define if you have the <sys/vfs.h> header file. */
#undef HAVE_SYS_VFS_H
/* Define if you have the <termios.h> header file. */
#undef HAVE_TERMIOS_H
/* Define if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* Define if you have the <utime.h> header file. */
#undef HAVE_UTIME_H
/* Define if you have the intl library (-lintl). */
#undef HAVE_LIBINTL
/* Define if you have the nsl library (-lnsl). */
#undef HAVE_LIBNSL
/* Define if you have the pt library (-lpt). */
#undef HAVE_LIBPT
/* Define if you have the socket library (-lsocket). */
#undef HAVE_LIBSOCKET
#ifdef HAVE_LIBPT
# define HAVE_GRANTPT
#endif
#if defined(HAVE_LIBCRYPT) || defined(HAVE_LIBCRYPT_I)
# define HAVE_CRYPT
#endif
#ifdef HAVE_XVIEW
# include <xvmain.h>
#endif
#if defined(HAVE_SIGADDSET) && defined(HAVE_SIGEMPTYSET)
# if defined(HAVE_SIGACTION) && defined(HAVE_SIGPROCMASK)
# define SLANG_POSIX_SIGNALS
# endif
#endif
#ifdef __os2__
# define OS2_NT 1
# define S_ISFIFO(x) 0
#endif
#ifdef _OS_NT
# define OS2_NT 1
#endif
#ifndef OS2_NT
/* some Unices do not define this, and slang requires it: */
#ifndef unix
# define unix
#endif
#endif

8487
configure vendored Executable file

File diff suppressed because it is too large Load Diff

1440
configure.in Normal file

File diff suppressed because it is too large Load Diff

20
create_vcs Executable file
View File

@ -0,0 +1,20 @@
#!/bin/sh
#
# Script by Jakub Jelinek
#
if test -e /dev/vcs0
then
exit
fi
I=0
while [ $I -lt 64 ]
do
mknod /dev/vcs$I c 7 $I
chmod 622 /dev/vcs$I
chown root.tty /dev/vcs$I
mknod /dev/vcsa$I c 7 `expr $I + 128`
chmod 622 /dev/vcsa$I
chown root.tty /dev/vcsa$I
I=`expr $I + 1`
done

123
doc/DEVEL Normal file
View File

@ -0,0 +1,123 @@
-*-outline-*-
This is the developers' hint guide.
Some parts are based on mail messages.
Please feel free to add your name to this list:
by Miguel de Icaza
* Working with the Midnight Commander
If you plan on working on the Midnight Commander, here are some
tips on how to make your development easier and my job of merging
your code easier, I find them useful.
o Run make depend if you modify the source code structure (e.g. you
add/remove include files). This is very important, it will help you
to get an accurate compilation.
o It's recommended that you use GNU Make (if you want to use the
depend feature).
o I work with the tags feature of GNU emacs. Run the make tags
command to get an updated TAGS file. The command Alt-. will take
you to any function or variable definition.
o Try to keep the indenting style as it is currently. Normally if you
just created a new file with a different coding style, run the GNU
indent program on it (remember to make a backup copy first) like
this: indent -kr -pcs filename.c
o This code is distributed under the GNU General Public License and
Keep this in mind when adding code to the program.
* Code structure.
The program uses extensively the dialog manager written by Radek
Doulik. To understand how the dialog manager works, please read
the dlg.c and dlg.h. You will find the basic widgets in the file
widget.c and the widget.h file. If you understand this two files,
you are done. The files option.c and boxes.c contain some examples
of how the dialog manager functions are used. For a more complete
example, take a look at the main.c file.
Take a look at the FILES file in the doc/ directory. It has a
roadmap of the files that make up the Midnight Commander.
The file util.c has a lot of utility functions. Get familiar with
them, they are very simple.
The code has almost no hardcoded limits, there are a lot of ways of
avoiding them. For example, when you want to concatenate strings,
use the copy_strings functions, it is used like this:
new_text = copy_strings (username, " ", password, NULL);
This mallocs the required area, so it still needs to be freed.
* Upcoming changes.
* Panels
* Input handling
The routines for input handling on the Midnight Commander are:
xgetch, get_key_code, mi_getch and get_event.
xgetch is an interface to the low level system input mechanism. It
does not deal with the mouse.
In the case of curses, this is a macro that translates to getch, on
BSD curses, it is an interface to x_getch. This routine on curses
translates key sequences to key codes (\E[A to something like
KEY_UP or whatever).
In the case of slang there is no such conversion, that's why we
load a set of extra definitions.
The get_key_code routine converts the data from xgetch to the
constants the Midnight Commander uses.
In the case of slang, it will actually do all the jobs that getch
does for curses. In the case of curses it patches a couple of
sequences that are not available on some terminal databases. This
routine is the one you want to use if you want a character without
the mouse support.
get_event is the routine you want to use if you want to handle mouse
events, it will return 0 on a mouse event, ERR if no input is
available or a key code if there is some input available. This
routine in turn uses get_key_code to decode the input stream and
convert it to useful constants.
mi_getch is just a wrapper around get_event that ignores all the mouse
events. It's used only in a couple of places, this routine may return
ERR if no input is available (if you have set the nodelay option of
curses or slang with nodelay) or a character code if no such option is
available.
* Mouse support.
The mouse support in the Midnight Commander is based on the get_event
routine. The core of the mouse event dispatching is in the
dlg.c:run_dlg routine.
* ncurses
We are dropping it in favor of slang, but we will still support it. We
basically are using a small subset of ncurses because we want to be
compatible with Slang.
* The Dialog manager and the Widgets
** Button widget
** Check box widget
** Radio widget
** Input widget
** Listbox widget

130
doc/FILES Normal file
View File

@ -0,0 +1,130 @@
COPYING GNU General public license
INSTALL Installing directions
INSTALL.FAST Short directions for busy people
NEWS List of new features by version
README Mini documentation
create_vcs Creates /dev/vcs? entries for Linux > 1.1.92
mcfn_install.in Templace for a script to install mc () function into your /etc/profile or ~/.profile
mc.spec.in Template for rpm specification file
mc.spec rpm secification file
doc/ Directory: Documentation files
doc/DEVEL Development hints
doc/FILES List of the files included in the distribution
doc/LSM Linux software map entry
doc/mc.1.in Template for MC anual page
doc/mcedit.1.in Template for MC edit anual page
doc/mcserv.8.in Template for MC file server manual page
install-sh Install command if BSD compatible install is not found
lib/ Directory: Additional useful files
lib/ansi.ti Terminfo database for generic ansi terminal
lib/linux.ti Enhanced terminfo database for Linux console
lib/mc.ext Sample executable extension file
lib/mc.menu Sample user menu file
lib/ncurses.h To be used if the real ncurses is not available
lib/tdiff Tool to compare two terminfo databases
lib/vt100.ti Enhanced terminfo database for vt100 terminal
lib/xnc.hlp The part of the mc.hlp file not produced from the mc.1 file
lib/xterm.ti Enhanced terminfo database for xterm terminal
lib/tkmc.wmconfig MC registration file for AnotherLevel RH desktop
lib/mcserv.pamd PAM registration file for mcserv service
lib/mcserv.init mcserv SySV init script for RH Linux
slang/ Directory: Slang screen manager (from Slang distribution)
slang/slang.h
slang/sldisply.c
slang/slerr.c
slang/slsmg.c
slang/slutty.c
src/ Directory: Midnight Commander source files
src/ChangeLog Detailed list of changes
src/GNUmakefile Makefile wrapper for GNU make
src/Makefile.in Makefile template for configure
src/TODO Things to be done, ongoing projects
src/achown.c Advanced chown/chmod dialog
src/auto.c Automatic mounting and unmounting
src/auto.h "
src/boxes.c Miscellaneous dialog boxes
src/boxes.h "
src/chmod.c Chown dialog
src/chmod.h "
src/chown.c Chmod dialog
src/chown.h "
src/cmd.c The commands implementation.
src/cmd.h "
src/color.c Color terminal detection and color definitions
src/color.h "
src/complete.c Completion of filenames etc.
src/complete.h "
src/configure Configures Midnight Commander for target machine
src/configure.in Configure template for GNU autoconf (2.x)
src/cons.handler.c API for taking advantage of cons.saver daemon
src/cons.saver.c Linux console image save and restore daemon
src/cons.saver.h Common header file for cons.handler.c and cons.saver.c
src/dialog.c Old dialog routines
src/dialog.h "
src/dir.c Loading and sorting of directory contents
src/dir.h "
src/dlg.c New dialog routines (see also widget.c)
src/dlg.h "
src/ext.c Executable extensions feature
src/ext.h "
src/file.c File operations (copy, move, delete)
src/file.h "
src/find.c File search feature
src/find.h "
src/fsusage.c File system space usage (from GNU fileutils)
src/fsusage.h "
src/gindex.pl Creates index for the mc.hlp file
src/global.h Some global definitions
src/help.c Hypertext help browser (for browsing the mc.hlp file)
src/help.h "
src/hotlist.c Directory hotlist
src/hotlist.h "
src/key.c Keyboard and mouse reading
src/key.h "
src/layout.c Division of the screen area between panels (layout dialog)
src/layout.h "
src/mad.c Simple memory allocation debugger (not normally used)
src/mad.h "
src/main.c Trash can
src/main.h "
src/man2hlp.c Creates mc.hlp and mc.html from mc.1
src/mc.hlp Hypertext help file
src/mem.h Strcpy, memcpy, bcopy and friends
src/menu.c Menu bar and its drop-down menus
src/menu.h "
src/mountlist.c List of mounted filesystems (from GNU fileutils)
src/mountlist.h "
src/mouse.c Mouse initialization, mouse events (see also key.c)
src/mouse.h "
src/option.c Configuration dialog
src/option.h "
src/panel.h Directory panel structure definition
src/profile.c Code to handle MS-Windows style INI files (from WINE)
src/profile.h "
src/regex.c Regular expression code (from GNU regex library)
src/regex.h "
src/screen.c Outputting of the directory panels to the screen
src/setup.c Loading and saving of the setup
src/setup.h "
src/slint.c Support file for Slang screen manager
src/subshell.c Concurrent shell support (optional)
src/subshell.h "
src/terms.c Enter and exit the cursor addressing mode (xterm)
src/tree.c Directory tree feature
src/tree.h "
src/user.c User menu handling and macro capabilities
src/user.h "
src/util.c Useful utility routines (don't output to screen)
src/util.h "
src/vfs.c Virtual file system (to support transparent ftp, tar, zip etc.)
src/vfs.h "
src/view.c Internal file viewer
src/view.h "
src/widget.c Widgets for dialog manager (see also dlg.c)
src/widget.h "
src/win.c Useful utility routines (which output to screen)
src/win.h "
src/wtools.c Listbox and query dialog routines etc.
src/wtools.h "
src/xcurses.c BSD curses support
src/xmkdir Replacement for "mkdir -p /dir" because some systems don't support the -p flag

57
doc/LSM Normal file
View File

@ -0,0 +1,57 @@
Begin3
Title: Midnight Commander
Version: 4.1
Entered-date: 25DEC97
Description: File manager and visual shell with transparent support
for tar, ftp, rpm, deb (and others) as file systems.
Builtin hex and text, editor and viewer. Online help,
file type interpretation, and hundreds of powerful
features and short cuts.
Keywords: file directory manager shell browser utility curses
mouse menu visual user-friendly color vfs tar ftp gzip
undelete editor viewer
Author: borsenkow.msk@sni.de (Andrej Borsenkow)
rodo@earn.cvut.cz (Radek Doulik)
mr854307@cs.nthu.edu.tw (Ching Hui)
miguel@roxanne.nuclecu.unam.mx (Miguel de Icaza)
jj@sunsite.mff.cuni.cz (Jakub Jelinek)
jtklehto@paju.oulu.fi (Janne Kukonlehto)
fredl@nebula.ow.org (Fred Leeflang)
mok@roxanne.nuclecu.unam.mx (Mauricio Plaza)
dugan@b011.eunet.es (Dugan Porter)
psheer@icon.co.za (Paul Sheer)
k3190@fh-sw.de (Norbert Warmuth)
Maintained-by: miguel@roxanne.nuclecu.unam.mx (Miguel de Icaza)
Primary-site: sunsite.unc.edu /pub/Linux/utils/file/managers/mc
1200k mc-4.1.tar.gz
Alternate-site: ftp.nuclecu.unam.mx /linux/local
1200k mc-4.1.tar.gz
Platforms: alpha-dec-osf, alpha-linux, hppa-hp-hpux, ix86-bsdi,
ix86-freebsd, ix86-linux, ix86-os2, ix86-sco,
ix86-solaris, ix86-windows95, ix86-windows-nt,
m68k-apple-aux, mc88110-aviion-dgux, mips-sgi-irix,
mips-dec-ultrix, powerpc-ibm-aix, powerpc-linux,
rs6000-ibm-aix, sparc-sun-netbsd, sparc-sun-solaris,
sparc-sun-sunos, sparc-linux, unixware.
If mouse support is required on the
Linux console, then the GPM mouse server.
(available at iride.unipv.it:/pub/gpm)
(ftp.nuclecu.unam.mx:/linux/local)
It is also preferable to use Rxvt as an X
Terminal if you are using mc under X.
(available at ftp.math.fu-berlin.de:/pub/rxvt)
(ftp.nuclecu.unam.mx:/linux/local)
Copying-policy: GPL
End

81
doc/Makefile.in Normal file
View File

@ -0,0 +1,81 @@
srcdir = @srcdir@
VPATH = @srcdir@
rootdir = $(srcdir)/..
@MCFG@@MCF@
#
# Distribution variables
#
DISTDOC = Makefile.in LSM DEVEL FILES mc.sgml linuxdoc-sgml.diff \
mc.1.in mcedit.1.in mcserv.8.in
LINUXDOCDIR = /usr/local/linuxdoc-sgml
all:
install:
-$(SEDCMD2) < $(srcdir)/mc.1 > $(DESTDIR)$(mandir)/$(manprefix)mc.$(manext)
-$(SEDCMD2) < $(srcdir)/mcedit.1 > $(DESTDIR)$(mandir)/$(manprefix)mcedit.$(manext)
-$(SEDCMD2) < $(srcdir)/mcserv.8 > $(DESTDIR)$(man8dir)/$(manprefix)mcserv.$(man8ext)
uninstall:
-cd $(mandir); $(RMF) $(manprefix)mc.$(manext)
-cd $(mandir); $(RMF) $manprefix)mcedit.$(manext)
-cd $(man8dir); $(RMF) $(manprefix)mcserv.$(man8ext)
check:
@echo no tests are supplied.
TAGS:
cross:
alldoc: mc.html mc.info mc.dvi mc.ps mc.tex mc.txt mc.hlp mc.texi mc.1 mcedit.1
mc.html: mc.sgml
-mkdir html
cd html; $(LN_S) $(srcdir)/mc.sgml .; $(LINUXDOCDIR)/bin/format -T htmlx mc; $(RMF) mc.sgml
if test -f html/FILEROOT.html; then mv html/FILEROOT.html html/mc.html; fi
mc.info: mc.sgml
-mkdir info
cd info; $(LINUXDOCDIR)/bin/format -T info $(srcdir)/mc > mc.info
mc.dvi: mc.sgml
$(LINUXDOCDIR)/bin/format -T latex $(srcdir)/mc | $(LINUXDOCDIR)/bin/qtex -d > mc.dvi
mc.ps: mc.sgml
$(LINUXDOCDIR)/bin/format -T latex $(srcdir)/mc | $(LINUXDOCDIR)/bin/qtex > mc.ps
mc.tex: mc.sgml
$(LINUXDOCDIR)/bin/format -T latex $(srcdir)/mc > mc.tex
mc.txt: mc.sgml
$(LINUXDOCDIR)/bin/format -T ascii $(srcdir)/mc > mc.txt
../src/fixhlp:
cd ../src; $(MAKE) fixhlp
mc.hlp: mc.sgml ../src/fixhlp $(datadir)/xnc.hlp
$(LINUXDOCDIR)/bin/format -T hlp $(srcdir)/mc | ../src/fixhlp 58 mc.hlp.toc > mc.hlp.tmp
cat mc.hlp.toc mc.hlp.tmp $(datadir)/xnc.hlp > mc.hlp
$(RMF) mc.hlp.toc mc.hlp.tmp
mc.texi: mc.sgml
$(LINUXDOCDIR)/bin/format -T texi $(srcdir)/mc > mc.texi
mc.1: mc.sgml
$(LINUXDOCDIR)/bin/format -T man $(srcdir)/mc > mc.1
clean:
realclean:
distclean:
-$(RMF) $(srcdir)/*~ $(srcdir)/Makefile $(srcdir)/*.1 $(srcdir)/*.8
distcopy:
$(CP) $(DISTDOC) ../../mc-$(VERSION)/doc
depend dep:

814
doc/linuxdoc-sgml.diff Normal file
View File

@ -0,0 +1,814 @@
diff -u -r -N /home/jj/src/mc-old/linuxdoc-sgml/bin/format linuxdoc-sgml/bin/format
--- /home/jj/src/mc-old/linuxdoc-sgml/bin/format Sun Sep 17 23:34:49 1995
+++ linuxdoc-sgml/bin/format Mon Sep 18 23:00:26 1995
@@ -134,6 +134,16 @@
$SGMLS | $SGMLSASP $USERREP $REP | expand $TABS | \
mkinfo $SGMLFILE
;;
+ texi)
+ # format the document, writing to standard out
+ TYPE=info
+ SGML_PATH=$REPDIR/$TYPE/%N:$SGML_PATH
+ REP=$REPDIR/$TYPE/mapping;
+
+ sed 's/\@/\@\@/g' $SGMLFILE | \
+ $SGMLS | $SGMLSASP $USERREP $REP | expand $TABS | \
+ mkinfo $SGMLFILE -texi
+ ;;
*)
# format the document, writing to standard out
REP=$REPDIR/$TYPE/mapping;
diff -u -r -N /home/jj/src/mc-old/linuxdoc-sgml/bin/mkinfo linuxdoc-sgml/bin/mkinfo
--- /home/jj/src/mc-old/linuxdoc-sgml/bin/mkinfo Thu Aug 24 20:24:19 1995
+++ linuxdoc-sgml/bin/mkinfo Mon Sep 18 22:43:43 1995
@@ -171,7 +171,11 @@
}
}
' $TMP > $TMP2
+if test -n "$2"; then
+cat $TMP2
+else
$MAKEINFO $TMP2 -o $INFO
+fi
rm -f $TMP $TMP2
# end of mkinfo script
diff -u -r -N /home/jj/src/mc-old/linuxdoc-sgml/dtd/linuxdoc.dtd linuxdoc-sgml/dtd/linuxdoc.dtd
--- /home/jj/src/mc-old/linuxdoc-sgml/dtd/linuxdoc.dtd Sun Jun 18 21:02:42 1995
+++ linuxdoc-sgml/dtd/linuxdoc.dtd Fri Sep 22 16:34:38 1995
@@ -8,7 +8,7 @@
<!-- url added by HG; htmlurl added by esr -->
<!entity % xref
- " label|ref|pageref|cite|url|htmlurl|ncite " >
+ " label|ref|lnk|pageref|cite|url|htmlurl|ncite " >
<!entity % inline
" (#pcdata | f| x| %emph; |sq| %xref | %index )* " >
@@ -138,7 +138,7 @@
"^" circ
"{" lcub
"}" rcub
- "|" verbar>
+ "|" verbar >
-->
<!element figure - - ((eps | ph ), caption?)>
@@ -257,7 +257,7 @@
"^" circ
"{" lcub
"}" rcub
- "|" verbar>
+ "|" verbar >
<!usemap fmap f >
@@ -274,7 +274,7 @@
"^" circ
"{" lcub
"}" rcub
- "|" verbar>
+ "|" verbar >
<!usemap dmmap (dm,eq)>
<!element fr - - (nu,de) >
@@ -312,7 +312,7 @@
"%" percnt
"^" circ
"{" lcub
- "}" rcub >
+ "}" rcub >
<!usemap arrmap ar >
<!element sup - - ((%fbutxt;)*) -(tu) >
@@ -350,7 +350,7 @@
"^" circ
"{" lcub
"}" rcub
- "|" verbar>
+ "|" verbar >
<!usemap global linuxdoc>
<!element label - o empty>
@@ -362,6 +362,12 @@
id cdata #required
name cdata "&refnam">
+<!-- lnk -->
+<!element lnk - o empty>
+<!attlist lnk
+ id cdata #required
+ name cdata "&refnam">
+
<!-- url entity added to have direct url references HG -->
<!element url - o empty>
<!attlist url
@@ -405,7 +411,14 @@
opts cdata "null">
<!-- Hacked by mdw, abstract now part of titlepag -->
-<!element titlepag o o (title, author, date?, abstract?)>
+<!element titlepag o o (mantitle?, title, author, date?, abstract?)>
+<!element mantitle - o empty>
+<!attlist mantitle
+ title cdata ""
+ sectnum cdata "1"
+ date cdata "1 January 1995"
+ name cdata "">
+
<!element title - o (%inline, subtitle?) +(newline)>
<!element subtitle - o (%inline)>
<!usemap oneline titlepag>
@@ -532,7 +545,7 @@
"^" circ
"{" lcub
"}" rcub
- "|" verbar>
+ "|" verbar >
<!usemap manpage manpage >
<!-- end of linuxdoc dtd -->
diff -u -r -N /home/jj/src/mc-old/linuxdoc-sgml/lib/linuxdoc-sgml.sty linuxdoc-sgml/lib/linuxdoc-sgml.sty
--- /home/jj/src/mc-old/linuxdoc-sgml/lib/linuxdoc-sgml.sty Tue Jun 7 21:13:36 1994
+++ linuxdoc-sgml/lib/linuxdoc-sgml.sty Mon Sep 18 23:22:36 1995
@@ -69,7 +69,8 @@
\noindent
{\huge\sf \@title}\\
\rule{\textwidth}{1mm}\\
-\mbox{} \@author\ \hfill \@date\ \\
+\mbox{} \@author\ \\
+\mbox{} \@date\ \\
\vskip 1 ex
\noindent{\sf \@abstract}
\setcounter{footnote}{0}%
diff -u -r -N /home/jj/src/mc-old/linuxdoc-sgml/rep/grops/general linuxdoc-sgml/rep/grops/general
--- /home/jj/src/mc-old/linuxdoc-sgml/rep/grops/general Tue Jun 7 21:13:44 1994
+++ linuxdoc-sgml/rep/grops/general Fri Sep 22 23:43:44 1995
@@ -88,6 +88,9 @@
<!entity commat sdata "\(at" >
<!entity lsqb sdata "[" >
<!entity rsqb sdata "]" >
+<!entity bslsh sdata "\\" >
+<!entity bslshd sdata "\\" >
+<!entity bslshv sdata "\\" >
<!entity lowbar sdata "_" >
<!entity lcub sdata "{" >
<!entity verbar sdata "\(ba" >
diff -u -r -N /home/jj/src/mc-old/linuxdoc-sgml/rep/grops/mapping linuxdoc-sgml/rep/grops/mapping
--- /home/jj/src/mc-old/linuxdoc-sgml/rep/grops/mapping Tue Jun 7 21:13:44 1994
+++ linuxdoc-sgml/rep/grops/mapping Fri Sep 22 23:57:42 1995
@@ -562,6 +562,9 @@
<ps> + ".LP\np.s."
+<url> "[URL]"
+</url>
+
% end of roff replacement file
diff -u -r -N /home/jj/src/mc-old/linuxdoc-sgml/rep/hlp/general linuxdoc-sgml/rep/hlp/general
--- /home/jj/src/mc-old/linuxdoc-sgml/rep/hlp/general Thu Jan 1 01:00:00 1970
+++ linuxdoc-sgml/rep/hlp/general Fri Sep 22 23:43:59 1995
@@ -0,0 +1,114 @@
+
+<!-- hlp translation for general purpose qwertz characters. If I
+was unable to think of an intuitive ASCII representation for some
+symbol or character, I just used its SGML representation. -->
+
+
+<!entity AElig sdata "AE" >
+<!entity Aacute sdata "A" >
+<!entity Acirc sdata "A" >
+<!entity Agrave sdata "A" >
+<!entity Atilde sdata "A" >
+<!entity Ccedil sdata "C" >
+<!entity Eacute sdata "E" >
+<!entity Egrave sdata "E" >
+<!entity Euml sdata "E" >
+<!entity Iacute sdata "I" >
+<!entity Icirc sdata "I" >
+<!entity Igrave sdata "I" >
+<!entity Iuml sdata "I" >
+<!entity Ntilde sdata "N" >
+<!entity Oacute sdata "O" >
+<!entity Ocirc sdata "O" >
+<!entity Ograve sdata "O" >
+<!entity Oslash sdata "O" >
+<!entity Uacute sdata "U" >
+<!entity Ugrave sdata "U" >
+<!entity Yacute sdata "Y" >
+<!entity aacute sdata "a" >
+<!entity acirc sdata "a" >
+<!entity aelig sdata "ae" >
+<!entity agrave sdata "a" >
+<!entity aring sdata "a" >
+<!entity atilde sdata "a" >
+<!entity ccedil sdata "c" >
+<!entity eacute sdata "e" >
+<!entity ecirc sdata "e" >
+<!entity egrave sdata "e" >
+<!entity euml sdata "e" >
+<!entity iacute sdata "i" >
+<!entity icirc sdata "i" >
+<!entity igrave sdata "i" >
+<!entity iuml sdata "i" >
+<!entity ntilde sdata "n" >
+<!entity oacute sdata "o" >
+<!entity ocirc sdata "o" >
+<!entity ograve sdata "o" >
+<!entity oslash sdata "o" >
+<!entity otilde sdata "o" >
+<!entity uacute sdata "u" >
+<!entity ucirc sdata "u" >
+<!entity ugrave sdata "u" >
+<!entity yacute sdata "y" >
+<!entity yuml sdata "y" >
+<!entity lt sdata "<" >
+<!entity amp sdata "&" >
+<!entity ero sdata "&" >
+<!entity etago sdata "</" >
+<!entity dquot sdata '"' >
+<!entity num sdata "#" >
+<!entity percnt sdata "%" >
+<!entity quot sdata "'" >
+<!entity lpar sdata "(" >
+<!entity rpar sdata ")" >
+<!entity ast sdata "*" >
+<!entity plus sdata "+" >
+<!entity comma sdata "," >
+<!entity hyphen sdata "-" >
+<!entity colon sdata ":" >
+<!entity semi sdata ";" >
+<!entity equals sdata "=" >
+<!entity commat sdata "@" >
+<!entity lsqb sdata "[" >
+<!entity rsqb sdata "]" >
+<!entity bslsh sdata "\" >
+<!entity bslshd sdata "\" >
+<!entity bslshv sdata "\" >
+<!entity circ sdata "^" >
+<!entity lowbar sdata "_" >
+<!entity lcub sdata "{" >
+<!entity verbar sdata "|" >
+<!entity rcub sdata "}" >
+<!entity tilde sdata "~" >
+<!entity bsol sdata "\e" >
+<!entity dollar sdata "$" >
+<!entity nbsp sdata " " >
+<!entity emsp sdata " " >
+<!entity ensp sdata " " >
+<!entity thinsp sdata " " >
+<!entity mdash sdata "--" >
+<!entity ndash sdata "-" >
+<!entity hellip sdata "..." >
+<!entity Auml sdata "Ae" >
+<!entity auml sdata "ae" >
+<!entity Ouml sdata "Oe" >
+<!entity ouml sdata "oe" >
+<!entity Uuml sdata "Ue" >
+<!entity uuml sdata "ue" >
+<!entity szlig sdata "ss" >
+<!entity gt sdata ">" >
+<!entity sect sdata "&sect " >
+<!entity para sdata "&para " >
+<!entity copy sdata "&copy " >
+<!entity iexcl sdata "&iexcl " >
+<!entity iquest sdata "&iquest " >
+<!entity cent sdata "&cent " >
+<!entity pound sdata "&pound " >
+<!entity bull sdata "-" >
+<!entity times sdata "*" >
+<!entity plusmn sdata "+-" >
+<!entity divide sdata "/" >
+<!entity mu sdata "u" >
+<!entity not sdata "~" >
+<!entity refnam sdata "">
+<!entity urlnam sdata "">
diff -u -r -N /home/jj/src/mc-old/linuxdoc-sgml/rep/hlp/mapping linuxdoc-sgml/rep/hlp/mapping
--- /home/jj/src/mc-old/linuxdoc-sgml/rep/hlp/mapping Thu Jan 1 01:00:00 1970
+++ linuxdoc-sgml/rep/hlp/mapping Thu Sep 21 23:04:06 1995
@@ -0,0 +1,95 @@
+
+
+% qwertz manual replacement file
+% produces GNU Midnight Commander's hlp format
+
+<article>
+</article>
+
+<title> + "\""
+</title>
+<author> + "\""
+</author>
+<date> + "\""
+</date>
+
+<sect> + "\["
+</sect>
+<sect1> + "\[ "
+</sect1>
+<sect2> + "\[ "
+</sect2>
+<sect3> + "\[ "
+</sect3>
+<sect4> + "\[ "
+</sect4>
+<sect5> + "\[ "
+</sect5>
+
+<heading>
+</heading> "\n\n"
+
+<p> + "\n" +
+</p>
+
+
+<enum> "7"
+</enum> "1\n\n"
+<itemize> "7"
+</itemize> "1\n\n"
+<descrip> "7"
+</descrip> "1\n\n"
+
+% number register bi means "begin item". Used in the .P macro to print
+% bullets or numbers at beginning of first paragraph of an item.
+% If bi=1 then the paragraph is the first one of the item.
+
+<item> "\n4\n\no 7"
+</item>
+
+<tag> "\n4\n\n"
+</tag> " /7"
+
+<sq> ""
+</sq> ""
+
+<lq> ""
+</lq>
+
+<em> ""
+</em> " "
+
+<bf> ""
+</bf> " "
+
+<it> ""
+</it> " "
+
+<sf> ""
+</sf> " "
+
+<sl> ""
+</sl> " "
+
+<tt> ""
+</tt> " "
+
+
+<comment> + "" +
+</comment> + "" +
+
+<x>
+</x>
+
+% within code and verb, first turn off the escape mechanism
+
+<code> + "\nv"
+</code> + "n"
+<verb> + "\nv"
+</verb> + "n"
+<lnk> + "[NAME][ID]"
+</lnk>
+<ref> + "[NAME][ID]"
+</ref>
+<url> + "[URL]"
+</url>
diff -u -r -N /home/jj/src/mc-old/linuxdoc-sgml/rep/hlp/math linuxdoc-sgml/rep/hlp/math
--- /home/jj/src/mc-old/linuxdoc-sgml/rep/hlp/math Thu Jan 1 01:00:00 1970
+++ linuxdoc-sgml/rep/hlp/math Tue Jun 7 21:13:42 1994
@@ -0,0 +1,114 @@
+<!--
+
+Math symbols and Greek letters. Sed script for groff Also adds the
+"delim $$" declaration to the top of the file. Thus it is now
+unnecessary to pipe the ms file through eqn (or geqn) unless the
+file file contain formulas.
+
+1i\
+.EQ\
+delim $$\
+.EN
+-->
+
+<!entity circ sdata '{type "binary" \(ha}' >
+<!entity le sdata '{type "relation" \(<=}' >
+<!entity ge sdata '{type "relation" \(>=}' >
+<!entity congr sdata '{type "relation" \(=~}' >
+<!entity notin sdata '{type "relation" \(nm}' >
+<!entity nequiv sdata "\*[nequiv]" >
+<!entity divide sdata '{type "binary" \(di}' >
+<!entity cir sdata '{type "binary" \(ci}' >
+<!entity dot sdata '{type "binary" \(md}' >
+<!entity larr sdata '{type "relation" \(<-}' >
+<!entity rarr sdata '{type "relation" \(->}' >
+<!entity uarr sdata '{type "relation" \(ua}' >
+<!entity darr sdata '{type "relation" \(da}' >
+<!entity equiv sdata '{type "relation" \(==}' >
+<!entity ap sdata '{type "relation" \(~~}' >
+<!entity cap sdata '{type "binary" \(ca}' >
+<!entity cup sdata '{type "binary" \(cu}' >
+<!entity sub sdata '{type "relation" \(sb}' >
+<!entity sup sdata '{type "relation" \(sp}' >
+<!entity isin sdata '{type "relation" \(mo}' >
+<!entity sube sdata '{type "relation" \(ib}' >
+<!entity supe sdata '{type "relation" \(ip}' >
+<!entity not sdata "\(no" >
+<!entity infin sdata "\(if" >
+<!entity minus sdata "-" >
+<!entity ne sdata '{type "relation" \(!=}' >
+<!entity prop sdata "\(pt" >
+<!entity prime sdata "\(fm" >
+<!entity Prime sdata "\(sd" >
+<!entity empty sdata "\(es" >
+<!entity oplus sdata '{type "binary" \(c+}' >
+<!entity otimes sdata '{type "binary" \(c*}' >
+<!entity setmn sdata '{type "binary" \(rs}' >
+<!entity mid sdata '{type "binary" \(br}' >
+<!entity nsub sdata '\*[nsub]' >
+<!entity nsube sdata '\*[nsube]' >
+<!entity nsup sdata '\*[nsup]' >
+<!entity nsupe sdata '\*[nsupe]' >
+<!entity harr sdata '{type "relation" \(<>}' >
+<!entity and sdata '{type "relation" \(AN}' >
+<!entity or sdata '{type "relation" \(OR}' >
+<!entity bottom sdata "\(pp" >
+<!entity exist sdata "\(te" >
+<!entity forall sdata "\(fa" >
+<!entity hArr sdata '{type "relation" \(hA}' >
+<!entity lArr sdata '{type "relation" \(lA}' >
+<!entity rArr sdata '{type "relation" \(rA}' >
+<!entity vDash sdata '{type "relation" "\z\(br="}' >
+<!entity nvDash sdata '\*[nvDash]' >
+<!entity nvdash sdata '\*[nvdash]' >
+<!entity vdash sdata '{type "relation" "\z\(br\(en"}' >
+<!entity lang sdata '{type "opening" \(la}' >
+<!entity rang sdata '{type "closing" \(ra}' >
+<!entity uArr sdata '{type "relation" \(uA}' >
+<!entity dArr sdata '{type "relation" \(dA}' >
+<!entity square sdata "\(sq" >
+<!entity aleph sdata "\(Ah" >
+<!entity image sdata "\(Im" >
+<!entity real sdata "\(Re" >
+<!entity part sdata "\(pd" >
+<!entity nabla sdata "\(gr" >
+<!entity clubs sdata "\(CL" >
+<!entity hearts sdata "\(HE" >
+<!entity diams sdata "\(DI" >
+<!entity spades sdata "\(SP" >
+<!entity ang sdata " \(/_ " >
+<!entity alpha sdata " alpha " >
+<!entity beta sdata " beta " >
+<!entity gamma sdata " gamma " >
+<!entity Gamma sdata " GAMMA " >
+<!entity delta sdata " delta " >
+<!entity Delta sdata " DELTA " >
+<!entity epsi sdata " epsilon " >
+<!entity zeta sdata " zeta " >
+<!entity eta sdata " eta " >
+<!entity thetas sdata " theta " >
+<!entity Theta sdata " THETA " >
+<!entity iota sdata " iota " >
+<!entity kappa sdata " kappa " >
+<!entity lambda sdata " lambda " >
+<!entity mu sdata "\(*m" >
+<!entity nu sdata " nu " >
+<!entity xi sdata " xi " >
+<!entity Xi sdata " XI " >
+<!entity pi sdata " pi " >
+<!entity Pi sdata " PI " >
+<!entity rho sdata " rho " >
+<!entity sigma sdata " sigma " >
+<!entity sigmav sdata "\(ts" >
+<!entity Sigma sdata " SIGMA " >
+<!entity tau sdata " tau " >
+<!entity upsi sdata " upsilon " >
+<!entity Upsi sdata " UPSILON " >
+<!entity phis sdata " phi " >
+<!entity Phi sdata " PHI " >
+<!entity chi sdata " chi " >
+<!entity psi sdata " psi " >
+<!entity Psi sdata " PSI " >
+<!entity omega sdata " omega " >
+<!entity Omega sdata " OMEGA " >
+
diff -u -r -N /home/jj/src/mc-old/linuxdoc-sgml/rep/html/general linuxdoc-sgml/rep/html/general
--- /home/jj/src/mc-old/linuxdoc-sgml/rep/html/general Tue Aug 15 06:15:35 1995
+++ linuxdoc-sgml/rep/html/general Fri Sep 22 23:44:19 1995
@@ -66,7 +66,10 @@
<!entity commat sdata "&commat;" >
<!entity lsqb sdata "[" >
<!entity rsqb sdata "]" >
-<!entity circ sdata "&circ;" >
+<!entity bslsh sdata "\" >
+<!entity bslshd sdata "\" >
+<!entity bslshv sdata "\" >
+<!entity circ sdata "^" >
<!entity lowbar sdata "_" >
<!entity lcub sdata "{" >
<!entity verbar sdata "|" >
diff -u -r -N /home/jj/src/mc-old/linuxdoc-sgml/rep/html/mapping linuxdoc-sgml/rep/html/mapping
--- /home/jj/src/mc-old/linuxdoc-sgml/rep/html/mapping Wed Aug 16 04:36:12 1995
+++ linuxdoc-sgml/rep/html/mapping Sun Sep 17 22:48:50 1995
@@ -171,6 +171,11 @@
"<@@endref>" +
</ref>
+<lnk> + "<@@ref>[ID]\n"
+ "[NAME] </a>\n"
+ "<@@endref>" +
+</lnk>
+
<href> + "<@@ref>[ID]" +
</href>
diff -u -r -N /home/jj/src/mc-old/linuxdoc-sgml/rep/info/general linuxdoc-sgml/rep/info/general
--- /home/jj/src/mc-old/linuxdoc-sgml/rep/info/general Sun Jun 25 04:13:41 1995
+++ linuxdoc-sgml/rep/info/general Fri Sep 22 23:44:34 1995
@@ -69,6 +69,9 @@
<!entity commat sdata "@@" >
<!entity lsqb sdata "[" >
<!entity rsqb sdata "]" >
+<!entity bslsh sdata "\" >
+<!entity bslshd sdata "\" >
+<!entity bslshv sdata "\" >
<!entity circ sdata "^" >
<!entity lowbar sdata "_" >
<!entity lcub sdata "@{" >
diff -u -r -N /home/jj/src/mc-old/linuxdoc-sgml/rep/info/mapping linuxdoc-sgml/rep/info/mapping
--- /home/jj/src/mc-old/linuxdoc-sgml/rep/info/mapping Sun Jun 25 04:13:41 1995
+++ linuxdoc-sgml/rep/info/mapping Fri Sep 22 23:58:20 1995
@@ -166,6 +166,9 @@
<ref> + "@REF [ID]"
</ref>
+<lnk> + "[NAME]\n@REF [ID]"
+</lnk>
+
<pageref> "@REF [ID]"
</pageref>
@@ -330,6 +333,9 @@
<hline> + "\\hline" +
</hline>
+
+<url> "[URL]"
+</url>
% end of texinfo replacement file
diff -u -r -N /home/jj/src/mc-old/linuxdoc-sgml/rep/latex/general linuxdoc-sgml/rep/latex/general
--- /home/jj/src/mc-old/linuxdoc-sgml/rep/latex/general Tue Aug 15 06:13:56 1995
+++ linuxdoc-sgml/rep/latex/general Fri Sep 22 23:44:54 1995
@@ -67,6 +67,9 @@
<!entity commat sdata "@" >
<!entity lsqb sdata "[" >
<!entity rsqb sdata "]" >
+<!entity bslsh sdata "$\backslash$" >
+<!entity bslshd sdata "$\backslash$" >
+<!entity bslshv sdata "\" >
<!entity circ sdata "\verb+^+" >
<!entity lowbar sdata "\_" >
<!entity lcub sdata "\{" >
diff -u -r -N /home/jj/src/mc-old/linuxdoc-sgml/rep/latex/mapping linuxdoc-sgml/rep/latex/mapping
--- /home/jj/src/mc-old/linuxdoc-sgml/rep/latex/mapping Sun Jun 25 05:42:46 1995
+++ linuxdoc-sgml/rep/latex/mapping Mon Sep 18 23:15:50 1995
@@ -71,7 +71,7 @@
<inst> " \\\\\n\\\\" +
</inst>
-<date> + "\\date{"
+<date> + "\n\n\\date{"
</date> "}" +
<newline> "\\\\ "
@@ -201,6 +201,9 @@
<ref> "\\ref{[ID]}"
</ref>
+
+<lnk> "[NAME] (see \\ref{[ID]})"
+</lnk>
<pageref> "\\pageref{[ID]}"
</pageref>
diff -u -r -N /home/jj/src/mc-old/linuxdoc-sgml/rep/latin1/general linuxdoc-sgml/rep/latin1/general
--- /home/jj/src/mc-old/linuxdoc-sgml/rep/latin1/general Tue Jun 7 21:13:40 1994
+++ linuxdoc-sgml/rep/latin1/general Fri Sep 22 23:45:09 1995
@@ -66,6 +66,9 @@
<!entity commat sdata "@" >
<!entity lsqb sdata "[" >
<!entity rsqb sdata "]" >
+<!entity bslsh sdata "\\" >
+<!entity bslshd sdata "\\\\" >
+<!entity bslshv sdata "\\" >
<!entity circ sdata "^" >
<!entity lowbar sdata "_" >
<!entity lcub sdata "{" >
diff -u -r -N /home/jj/src/mc-old/linuxdoc-sgml/rep/latin1/mapping linuxdoc-sgml/rep/latin1/mapping
--- /home/jj/src/mc-old/linuxdoc-sgml/rep/latin1/mapping Tue Jun 7 21:13:41 1994
+++ linuxdoc-sgml/rep/latin1/mapping Fri Sep 22 23:58:51 1995
@@ -541,6 +541,9 @@
<ps> + ".LP\np.s."
+<url> "[URL]"
+</url>
+
% end of roff replacement file
diff -u -r -N /home/jj/src/mc-old/linuxdoc-sgml/rep/man/general linuxdoc-sgml/rep/man/general
--- /home/jj/src/mc-old/linuxdoc-sgml/rep/man/general Sun Aug 6 22:00:58 1995
+++ linuxdoc-sgml/rep/man/general Fri Sep 22 23:45:23 1995
@@ -71,6 +71,9 @@
<!entity commat sdata "@" >
<!entity lsqb sdata "[" >
<!entity rsqb sdata "]" >
+<!entity bslsh sdata "\\" >
+<!entity bslshd sdata "\\\\" >
+<!entity bslshv sdata "\\" >
<!entity circ sdata "^" >
<!entity lowbar sdata "_" >
<!entity lcub sdata "{" >
diff -u -r -N /home/jj/src/mc-old/linuxdoc-sgml/rep/man/mapping linuxdoc-sgml/rep/man/mapping
--- /home/jj/src/mc-old/linuxdoc-sgml/rep/man/mapping Thu Jul 13 18:57:50 1995
+++ linuxdoc-sgml/rep/man/mapping Fri Sep 22 23:59:07 1995
@@ -3,12 +3,13 @@
% qwertz manual replacement file
% produces nroff using the man macros
+<mantitle> + ".TH [TITLE] [SECTNUM] \"[DATE]\"\n.SH NAME\n[NAME]\n"
-<manpage> + ".if n .ds Q \\&\"\n"
+
+<article> + ".if n .ds Q \\&\"\n"
".if t .ds Q ``\n"
".if n .ds U \\&\"\n"
".if t .ds U ''\n"
- ".TH [TITLE] [SECTNUM] \n"
% James Clark's trick to prevent unintended paragraph
% breaks
@@ -56,10 +57,27 @@
".\\}\n"
"..\n"
-</manpage>
+</article>
+
+<title> + ".\\\""
+</title>
+<author> + ".\\\""
+</author>
+<date> + ".\\\""
+</date>
+<sect> + ".SH "
+</sect>
<sect1> + ".SH "
</sect1>
+<sect2> + ".SH "
+</sect2>
+<sect3> + ".SH "
+</sect3>
+<sect4> + ".SH "
+</sect4>
+<sect5> + ".SH "
+</sect5>
<heading>
</heading> "\n\n"
@@ -154,4 +172,11 @@
".ft P\n"
".sp" +
+<lnk> + "[NAME]"
+</lnk>
+
+<ref> + "[NAME]"
+</ref>
+<url> + "[URL]"
+</url>
diff -u -r -N /home/jj/src/mc-old/linuxdoc-sgml/rep/max/general linuxdoc-sgml/rep/max/general
--- /home/jj/src/mc-old/linuxdoc-sgml/rep/max/general Tue Jun 7 21:13:39 1994
+++ linuxdoc-sgml/rep/max/general Fri Sep 22 23:45:39 1995
@@ -66,6 +66,9 @@
<!entity commat sdata "&commat;" >
<!entity lsqb sdata "&lsqb;" >
<!entity rsqb sdata "&rsqb;" >
+<!entity bslsh sdata "&bslsh;" >
+<!entity bslshd sdata "&bslshd;" >
+<!entity bslshv sdata "&bslshv;" >
<!entity circ sdata "&circ;" >
<!entity lowbar sdata "&lowbar;" >
<!entity lcub sdata "&lcub;" >
diff -u -r -N /home/jj/src/mc-old/linuxdoc-sgml/rep/max/mapping linuxdoc-sgml/rep/max/mapping
--- /home/jj/src/mc-old/linuxdoc-sgml/rep/max/mapping Tue Jun 7 21:13:38 1994
+++ linuxdoc-sgml/rep/max/mapping Fri Sep 22 23:59:46 1995
@@ -10,6 +10,9 @@
<article> + "<ARTICLE OPTS=\"[OPTS]\">" +
</article> + "</ARTICLE>" +
+<mantitle> + "<MANTITLE TITLE=\"[TITLE]\" SECTNUM=\"[SECTNUM]\" DATE=\"[DATE]\" NAME=\"[NAME]\""
+</mantitle>
+
<report> + "<REPORT OPTS=\"[OPTS]\">" +
</report> + "</REPORT>" +
@@ -385,6 +388,9 @@
<ps> + "<PS>" +
</ps> + "</PS>" +
+
+<url> "<URL>"
+</url> "</URL>"
% end of max replacement file
diff -u -r -N /home/jj/src/mc-old/linuxdoc-sgml/rep/mgm/mapping linuxdoc-sgml/rep/mgm/mapping
--- /home/jj/src/mc-old/linuxdoc-sgml/rep/mgm/mapping Tue Jun 7 21:13:37 1994
+++ linuxdoc-sgml/rep/mgm/mapping Sat Sep 23 00:00:06 1995
@@ -517,6 +517,9 @@
<ps> + ".P 0\np.s."
+<url> "[URL]"
+</url>
+
% end of roff replacement file
diff -u -r -N /home/jj/src/mc-old/linuxdoc-sgml/rep/min/general linuxdoc-sgml/rep/min/general
--- /home/jj/src/mc-old/linuxdoc-sgml/rep/min/general Tue Jun 7 21:13:40 1994
+++ linuxdoc-sgml/rep/min/general Fri Sep 22 23:45:56 1995
@@ -66,6 +66,9 @@
<!entity commat sdata "&commat;" >
<!entity lsqb sdata "&lsqb;" >
<!entity rsqb sdata "&rsqb;" >
+<!entity bslsh sdata "&bslsh;" >
+<!entity bslshd sdata "&bslshd;" >
+<!entity bslshv sdata "&bslshv;" >
<!entity circ sdata "&circ;" >
<!entity lowbar sdata "&lowbar;" >
<!entity lcub sdata "&lcub;" >
diff -u -r -N /home/jj/src/mc-old/linuxdoc-sgml/rep/min/mapping linuxdoc-sgml/rep/min/mapping
--- /home/jj/src/mc-old/linuxdoc-sgml/rep/min/mapping Tue Jun 7 21:13:39 1994
+++ linuxdoc-sgml/rep/min/mapping Sat Sep 23 00:00:28 1995
@@ -11,6 +11,9 @@
<article> + "<article opts=\"[opts]\">" +
</article> + "</article>" +
+<mantitle> + "<mantitle title=\"[title]\" sectnum=\"[sectnum]\" date=\"[date]\" name=\"[name]\""
+</mantitle>
+
<report> + "<report opts=\"[opts]\">" +
</report> + "</report>" +
@@ -385,6 +388,9 @@
<ps> + "<ps>" +
</ps> + "" +
+
+<url> "[URL]"
+</url>
% end of min replacement file
diff -u -r -N /home/jj/src/mc-old/linuxdoc-sgml/rep/nroff/general linuxdoc-sgml/rep/nroff/general
--- /home/jj/src/mc-old/linuxdoc-sgml/rep/nroff/general Tue Jul 18 04:51:59 1995
+++ linuxdoc-sgml/rep/nroff/general Sat Sep 23 00:01:38 1995
@@ -72,6 +72,9 @@
<!entity commat sdata "@" >
<!entity lsqb sdata "[" >
<!entity rsqb sdata "]" >
+<!entity bslsh sdata "\\" >
+<!entity bslshd sdata "\\\\" >
+<!entity bslshv sdata "\" >
<!entity circ sdata "^" >
<!entity lowbar sdata "_" >
<!entity lcub sdata "{" >
diff -u -r -N /home/jj/src/mc-old/linuxdoc-sgml/rep/nroff/mapping linuxdoc-sgml/rep/nroff/mapping
--- /home/jj/src/mc-old/linuxdoc-sgml/rep/nroff/mapping Sun Jun 18 18:56:03 1995
+++ linuxdoc-sgml/rep/nroff/mapping Sat Sep 23 00:00:48 1995
@@ -637,5 +637,8 @@
<ps> + ".LP\np.s."
+<url> "[URL]"
+</url>
+
% end of roff replacement file

3038
doc/mc.1.in Normal file

File diff suppressed because it is too large Load Diff

2647
doc/mc.sgml Normal file

File diff suppressed because it is too large Load Diff

331
doc/mcedit.1.in Normal file
View File

@ -0,0 +1,331 @@
.TH mcedit 1 "30 January 1997"
.\"SKIP_SECTION"
.SH NAME
mcedit \- Full featured terminal text editor for Unix-like systems.
.\"SKIP_SECTION"
.SH USAGE
.B mcedit
[ file [\-bcCdfhstVx?]]
.SH DESCRIPTION
.LP
Mcedit is a link to
.B mc,
the Midnight Commander, forcing it
to immediately start its internal editor. The editor is a terminal
version of the
.B cooledit
standalone X Window editor.
.\".\"DONT_SPLIT"
.SH OPTIONS
.TP
.I "\-b"
Forces black and white display.
.TP
.I "\-c"
Force color mode on terminals where
.B mcedit
defaults to black and white.
.TP
.I "\-C <keyword>=<FGcolor>,<BGcolor>:<keyword>= ..."
Used to specify a different color set, where
.I keyword
is one of normal, selected, marked, markselect, errors,
reverse menu, menusel, menuhot, menuhotsel and gauge. The colors
are optional and are one of black, gray, red, brightred, green,
brightgreen, brown, yellow, blue, brightblue, magenta,
brightmagenta, cyan, brightcyan, lightgray and white.
See the
.B Colors
section in
.B mc.1
for more information.
.TP
.I "\-d"
Disables mouse support.
.TP
.I "\-f"
Displays the compiled-in search paths for Midnight Commander files.
.TP
.I "\-t"
Used only if the code was compiled with Slang and terminfo: it makes
the Midnight Commander use the value of the
.B TERMCAP
variable for the terminal information instead of the information on
the system wide terminal database
.TP
.I "\-V"
Displays the version of the program.
.TP
.I "\-x"
Forces xterm mode. Used when running on xterm-capable terminals (two
screen modes, and able to send mouse escape sequences).
.PP
.SH Features
The internal file editor provides most of the features of
common full screen editors. It has an extensible file size
limit of sixteen megabytes and edits binary files
flawlessly. The features it presently supports are: Block
copy, move, delete, cut, paste;
.I "key for key undo";
pull-down
menus; file insertion; macro definition; regular expression
search and replace (and our own scanf-printf search and
replace); shift-arrow MSW-MAC text highlighting (for the
linux console only); insert-overwrite toggle; word-wrap;
a variety of tabbing options; and an option
to pipe text blocks through shell commands like indent and
ispell.
.PP
.SH Keys
The editor is very easy to use and requires no tutoring.
To see what keys do what, just consult the appropriate
pull-down menu. Other keys are: Shift movement
keys do text highlighting (Linux console only).
.B Ctrl-Ins
copies to the file
.BR "~/cedit/cooledit.clip",
and
.B Shift-Ins
pastes from
.BR "~/cedit/cooledit.clip".
.B Shift-Del
cuts to
.BR "~/cedit/cooledit.clip",
and
.B Ctrl-Del
deletes highlighted text - all linux console only.
The completion key (see
.BR "mc.1")
also does a hard return
without an automatic indent. Mouse highlighting also works, and you
can override the mouse as usual by holding down the shift key
while dragging the mouse to let normal terminal mouse highlighting
work.
To define a macro, press
.B Ctrl-R
and then type out the key
strokes you want to be executed. Press
.B Ctrl-R
again when finished. You can then assign the macro to any key you
like by pressing that key. The macro is executed when you press
.B Ctrl-A
and then the assigned key. The macro is also executed if
you press Meta, Ctrl, or Esc and the assigned key, provided that the
key is not used for any other function. Once defined, the macro
commands go into the file
.BR "~/cedit/cooledit.macros".
Do NOT edit this file unless you are not going to use macros again
in the same editing session, because
.B Mcedit
caches macro key defines in memory.
.B Mcedit
now overwrites a macro if a macro with the same key already exists,
so you won't have to edit this file. You will also have to restart
other running editors for macros to take effect.
.B F19
will format C code when it is highlighted. For this
to work, make an executable file called
.B cedit/edit.indent.rc
in your home directory containing the following:
.IP
.nf
#!/bin/sh
# Use $HOME instead of ~ if this doesn't work.
# You may also have to use a different redirection
# syntax for some machines.
/usr/bin/indent -kr -pcs ~/cedit/cooledit.block >& /dev/null
cat /dev/null > ~/cedit/cooledit.error
.fi
.PP
.B C-p
will run ispell on a block of text in a similar way. The file
is
.B cedit/edit.spell.rc
.IP
.nf
#!/bin/sh
# Use $HOME instead of ~ if this doesn't work.
# You may also have to use a different redirection
# syntax for some machines.
/usr/local/bin/ispell ~/cedit/cooledit.block >& /dev/null
cat /dev/null > ~/cedit/cooledit.error
.fi
.PP
.SH Redefining Keys
Keys may be redefined from the Midnight Commander options
menu.
.PP
.SH OPTIONS
The following options are defined in
.B ".mc.ini".
You can modifiy them to change the editor behaviour, by editing the file.
An options dialog box is presently not supported, but will be in the
future. Unless specified, a 1 sets the option to on, and a 0 sets it to
off, as is usual.
.TP
.I use_internal_edit
This option is ignored when envoking
.B mcedit.
.TP
.I editor_word_wrap_line_length
Sets the maximum length of the line before a newline
is inserted automatically; 0 means off.
.TP
.I editor_key_emulation
1 for
.B Emacs
keys, and 0 for normal
.B Cooledit
keys.
.TP
.I editor_tab_spacing
Interpret the tab character as being of this length.
Default is 8. You should avoid using
other than 8 since most other editors and text viewers
assume a tab spacing of 8. Use
.B editor_fake_half_tabs
to simulate a smaller tab spacing.
.TP
.I editor_fill_tabs_with_spaces
Never insert a tab space. Rather insert spaces (ascii 20h) to fill to the
desired tab size.
.TP
.I editor_return_does_auto_indent
Pressing return will tab across to match the indentation
of the first line above that has text on it.
.TP
.I editor_backspace_through_tabs
Make a single backspace delete all the space to the left
margin if there is no text between the cursor and the left
margin.
.TP
.I editor_fake_half_tabs
This will emulate a half tab for those who want to program
with a tab spacing of 4, but do not want the tab size changed
from 8 (so that the code will be formatted the same when displayed
by other programs). When editing between text and the left
margin, moving and tabbing will be as though a tab space were
4, while actually using spaces and normal tabs for an optimal fill.
When editing anywhere else, a normal tab is inserted.
.TP
.I editor_option_save_mode
(0, 1 or 2.) The save mode (see the options menu also)
allows you to change the method
of saving a file. Quick save (0) saves the file by immediately,
truncating the disk file to zero length (i.e. erasing it)
and the writing the editor contents to the file. This method
is fast, but dangerous, since a system error during a file
save will leave the file only partially written, possibly
rendering the data irretrievable. When saving, the safe save (1)
option enables creation of a temporary file into which the
file contents are first written. In the event of an problem,
the original file is untouched. When the temporary file is
successfully written, it is renamed to the name of the original
file, thus replacing it. The safest method is create
backups (2). Where a backup file is created before any changes
are made. You can specify your own backup file extension in
the dialog. Note that saving twice will replace your backup
as well as your original file.
.PP
.SH Miscellaneous
(Scanf search and replace have previously not worked properly.
With this release, problems with search and replace have been
fixed.)
You can use scanf search and replace to search and replace
a C format string. First take a look at the
.B sscanf
and
.B sprintf
man pages to see what a format string
is and how it works. An example is as follows: Suppose you want
to replace all occurances of say, an open bracket, three
comma seperated numbers, and a close bracket, with the
word
.I apples,
the third number, the word
.I oranges
and then the second number, you would fill in the Replace dialog
box as follows:
.nf
.B Enter search string
(%d,%d,%d)
.B Enter replace string
apples %d oranges %d
.B Enter replacement argument order
3,2
.fi
The last line specifies that the third and then the second
number are to be used in place of the first and second.
It is advisable to use this feature with Prompt On Replace on, because
a match is thought to be found whenever the number of arguments found
matches the number given, which is not always a real match. Scanf also
treats whitespace as being elastic. Note that the scanf format %[ is
very useful for scanning strings, and whitespace.
The editor also displays non-us characters (160+). When editing
binary files, you should set
.B display bits
to 7 bits in the Midnight Commander options menu to keep the
spacing clean.
.PP
.SH FILES
@prefix@/lib/mc.hlp
.IP
The help file for the program.
.PP
@prefix@/lib/mc/mc.ini
.IP
The default system-wide setup for the Midnight Commander, used only if
the user lacks his own ~/.mc.ini file.
.PP
@prefix@/lib/mc/mc.lib
.IP
Global settings for the Midnight Commander. Settings in this file are
global to any Midnight Commander, it is useful to define site-global
.\"LINK2
terminal settings.
.\"Terminal databases"
.PP
$HOME/.mc.ini
.IP
User's own setup. If this file is present then the setup is loaded
from here instead of the system-wide startup file.
.PP
$HOME/cedit/
.IP
User's own temporary directory where block commands are processed
and saved.
.PP
.\"SKIP_SECTION"
.SH LICENSE
This program is distributed under the terms of the GNU General Public
License as published by the Free Software Foundation. See the built-in
help of the Midnight Commander for details on the License and the lack
of warranty.
.SH AVAILABILITY
The latest version of this program can be found at ftp.nuclecu.unam.mx
in the directory /linux/local and from Europe at sunsite.mff.cuni.cz in the
directory /GNU/mc and at ftp.teuto.de in the directory /lmb/mc.
The X Window version can be found at sunsite.unc.edu
in /pub/Linux/apps/editors/X or at argeas.argos.hol.gr in
/pub/unix/cooledit.
.SH SEE ALSO
cooledit(1), mc(1), gpm(1), terminfo(1), scanf(3).
.PP
.SH AUTHORS
Paul Sheer (psheer@icon.co.za) is the developer of
the Midnight Commander's internal editor.
.PP
.SH BUGS
See the file
.B README.edit
in the distribution for more information.

68
doc/mcserv.8.in Normal file
View File

@ -0,0 +1,68 @@
.TH mcserv 8 "16 May 1995"
.SH NAME
mcserv \- Midnight Commander file server.
.SH USAGE
.B mcserv
[\-diqvf] [\-p portnum]
.SH DESCRIPTION
.LP
mcserv is the server program for the Midnight Commander networking
file system. It provides access to the host file system to clients
running the Midnight file system (currently, only the Midnight
Commander file manager).
.PP
If the program is run as root the program will try to get a reserved
port otherwise it will use 9876 as the port.
.PP
If the system has a portmapper running, then the port will be
registered with the portmapper and thus clients will automatically
connect to the right port. If the system does not have a portmapper,
then a port should be manually specified with the -p option (see
below).
.PP
.SH OPTIONS
.TP
.I "-d"
Become a daemon, you should use this flag if you start the program
from one of the system startup files. This flag will make the program
handle any number of incoming requests by forking a new copy of itself
for each client.
.TP
.I "-q"
Quiet mode.
.TP
.I "-p"
To make the server listen on the specified
.B portnum
port.
.TP
.I "-f"
Force ftp authorization if classic fails. This is only useful on systems
whose password checking method is not supported by this version of mcserv.
Authorization is then done by trying to connect to the local ftp server
and supplying user name and password. Ftp server then says whether are you
successfuly logged in or whether you typed a wrong password. Use this with
care and only when necessary.
.TP
.I "-v"
Toggle on the verbose mode.
.SH LICENSE
This program is distributed under the terms of the GNU General Public
License as published by the Free Software Foundation. See the built-in
help for details on the License and the lack of warranty.
.SH BUGS
This program currently uses port 9876, and not a system secure port.
This is a potential security problem since it could be run by any user
on the system if the system daemon is not running.
.SH SEE ALSO
mc(1), portmap(8)
.PP
.PP
.nf
The Midnight Commander page on the World Wide Web:
http://mc.blackdown.org/mc/
.fi
.PP
.SH AUTHORS
Miguel de Icaza (miguel@roxanne.nuclecu.unam.mx).

84
edit/Makefile.in Normal file
View File

@ -0,0 +1,84 @@
srcdir = @srcdir@
VPATH = @srcdir@
rootdir = $(srcdir)/..
@MCFG@@MCF@
CFLAGS = $(XCFLAGS)
CPPFLAGS = $(XCPPFLAGS)
LDFLAGS = $(XLDFLAGS)
DEFS = $(XDEFS)
LIBS = @SHADOWLIB@ $(XLIBS) @TERMNET@ @PAMLIBS@ $(XLIB)
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
AR = @AR@
#
# Distribution variables
#
EDITSRC = edit.c editcmd.c editwidget.c edit_key_translator.c editdraw.c \
edit.h editmenu.c editcmddef.h wordproc.c editoptions.c
EDITOBJS = edit.o editcmd.o editwidget.o editdraw.o editmenu.o wordproc.o \
editoptions.o
DIST = Makefile.in README.edit $(EDITSRC)
all: @LIBEDIT_A@
.c.o:
$(CC) -c $(CPPFLAGS) $(DEFS) $(CFLAGS) -DMIDNIGHT $<
check:
@echo no tests are supplied.
libedit.a: $(EDITOBJS)
$(RMF) $@
$(AR) cr $@ $(EDITOBJS)
-$(RANLIB) $@
mcedit:
-$(RMF) $(DESTDIR)$(bindir)/$(binprefix)mcedit
$(LN_S) mc $(DESTDIR)$(bindir)/$(binprefix)mcedit
showlibdep:
@echo 'OBJS="$(EDITOBJS)"'
cross:
$(MAKE) CC=gcc-linux CPP="gcc-linux -E" \
CPPFLAGS="$(CPPFLAGS) -I/usr/local/lib/gcc-lib/i386-linux-linux/include/ncurses "
TAGS: $(EDITSRC)
etags $(EDITSRC)
clean:
$(RMF) *.o core a.out libedit.a
realclean: clean
$(RMF) .depend
$(RMF) TAGS
$(RMF) *~
distclean:
-$(RMF) $(srcdir)/*~ $(srcdir)/*.o $(srcdir)/a.out
-$(RMF) $(srcdir)/core $(srcdir)/libedit.a
-if test $(srcdir) = .; then $(MAKE) realclean; fi
-$(RMF) $(srcdir)/Makefile
install: @MCEDIT@
uninstall:
-$(RMF) $(DESTDIR)$(bindir)/$(binprefix)mcedit
distcopy:
$(CP) $(DIST) ../../mc-$(VERSION)/edit
depend dep: mcdep
fastdeploc:
# ***Dependencies***Do not edit***
@DOTDEPEND@
# ***End of dependencies***

1
edit/README.edit Normal file
View File

@ -0,0 +1 @@

2197
edit/edit.c Normal file

File diff suppressed because it is too large Load Diff

577
edit/edit.h Normal file
View File

@ -0,0 +1,577 @@
#ifndef __EDIT_H
#define __EDIT_H
#ifdef MIDNIGHT
# include <stdio.h>
# include <stdarg.h>
# include <sys/types.h>
# ifdef HAVE_UNISTD_H
# include <unistd.h>
# endif
# include <string.h>
# include "src/tty.h"
# include <sys/stat.h>
# include <errno.h>
# ifdef HAVE_FCNTL_H
# include <fcntl.h>
# endif
# include <stdlib.h>
# include <malloc.h>
#else
# include "global.h"
# include <stdio.h>
# include <stdarg.h>
# include <sys/types.h>
# ifdef HAVE_UNISTD_H
# include <unistd.h>
# endif
# include <my_string.h>
# include <sys/stat.h>
# ifdef HAVE_FCNTL_H
# include <fcntl.h>
# endif
# include <stdlib.h>
# include <stdarg.h>
# if TIME_WITH_SYS_TIME
# include <sys/time.h>
# include <time.h>
# else
# if HAVE_SYS_TIME_H
# include <sys/time.h>
# else
# include <time.h>
# endif
# endif
# include "regex.h"
#endif
#ifndef MIDNIGHT
# include <signal.h>
# include <X11/Xlib.h>
# include <X11/Xutil.h>
# include <X11/Xresource.h>
# include "lkeysym.h"
# include "coolwidget.h"
# include "app_glob.c"
# include "coollocal.h"
# include "stringtools.h"
#else
# include "src/main.h" /* for char *shell */
# include "src/mad.h"
# include "src/dlg.h"
# include "src/widget.h"
# include "src/color.h"
# include "src/dialog.h"
# include "src/mouse.h"
# include "src/global.h"
# include "src/help.h"
# include "src/key.h"
# include "src/wtools.h" /* for QuickWidgets */
# include "src/win.h"
# include "vfs/vfs.h"
# include "src/menu.h"
# include "src/regex.h"
# define WANT_WIDGETS
# define WIDGET_COMMAND (WIDGET_USER + 10)
# define N_menus 5
#endif
#define SEARCH_DIALOG_OPTION_NO_SCANF 1
#define SEARCH_DIALOG_OPTION_NO_REGEX 2
#define SEARCH_DIALOG_OPTION_NO_CASE 4
#define SEARCH_DIALOG_OPTION_BACKWARDS 8
#define CLIP_FILE "/.cedit/cooledit.clip"
#define MACRO_FILE "/.cedit/cooledit.macros"
#define BLOCK_FILE "/.cedit/cooledit.block"
#define ERROR_FILE "/.cedit/cooledit.error"
#define TEMP_FILE "/.cedit/cooledit.temp"
#define SCRIPT_FILE "/.cedit/cooledit.script"
#define EDIT_DIR "/.cedit"
#define EDIT_KEY_EMULATION_NORMAL 0
#define EDIT_KEY_EMULATION_EMACS 1
#define REDRAW_LINE (1 << 0)
#define REDRAW_LINE_ABOVE (1 << 1)
#define REDRAW_LINE_BELOW (1 << 2)
#define REDRAW_AFTER_CURSOR (1 << 3)
#define REDRAW_BEFORE_CURSOR (1 << 4)
#define REDRAW_PAGE (1 << 5)
#define REDRAW_IN_BOUNDS (1 << 6)
#define REDRAW_CHAR_ONLY (1 << 7)
#define REDRAW_COMPLETELY (1 << 8)
#define MOD_ABNORMAL (1 << 0)
#define MOD_UNDERLINED (1 << 1)
#define MOD_BOLD (1 << 2)
#define MOD_HIGHLIGHTED (1 << 3)
#define MOD_MARKED (1 << 4)
#define MOD_ITALIC (1 << 5)
#define MOD_CURSOR (1 << 6)
#define MOD_INVERSE (1 << 7)
#ifndef MIDNIGHT
# define EDIT_TEXT_HORIZONTAL_OFFSET 4
# define EDIT_TEXT_VERTICAL_OFFSET 3
#else
# define EDIT_TEXT_HORIZONTAL_OFFSET 0
# define EDIT_TEXT_VERTICAL_OFFSET 1
# define FONT_OFFSET_X 0
# define FONT_OFFSET_Y 0
#endif
#define EDIT_RIGHT_EXTREME option_edit_right_extreme
#define EDIT_LEFT_EXTREME option_edit_left_extreme
#define EDIT_TOP_EXTREME option_edit_top_extreme
#define EDIT_BOTTOM_EXTREME option_edit_bottom_extreme
#define MAX_MACRO_LENGTH 1024
/*there are a maximum of ... */
#define MAXBUFF 1024
/*... edit buffers, each of which is ... */
#define EDIT_BUF_SIZE 16384
/* ...bytes in size. */
/*x / EDIT_BUF_SIZE equals x >> ... */
#define S_EDIT_BUF_SIZE 14
/* x % EDIT_BUF_SIZE is equal to x && ... */
#define M_EDIT_BUF_SIZE 16383
#define SIZE_LIMIT (EDIT_BUF_SIZE * (MAXBUFF - 2))
/* Note a 16k stack is 64k of data and enough to hold (usually) around 10
pages of undo info. */
/* undo stack */
#define START_STACK_SIZE 32
/*some codes that may be pushed onto or returned from the undo stack: */
#define CURS_LEFT 601
#define CURS_RIGHT 602
#define DELETE 603
#define BACKSPACE 604
#define STACK_BOTTOM 605
#define CURS_LEFT_LOTS 606
#define CURS_RIGHT_LOTS 607
#define MARK_1 1000
#define MARK_2 700000000
#define KEY_PRESS 1400000000
/*Tabs spaces: (sofar only HALF_TAB_SIZE is used: */
#define TAB_SIZE option_tab_spacing
#define HALF_TAB_SIZE ((int) option_tab_spacing / 2)
struct macro {
short command;
short ch;
};
struct selection {
unsigned char * text;
int len;
};
struct editor_widget {
#ifdef MIDNIGHT
Widget widget;
#else
struct cool_widget *widget;
#endif
#define from_here num_widget_lines
int num_widget_lines;
int num_widget_columns;
#ifdef MIDNIGHT
int have_frame;
#else
int stopped;
#endif
char *filename; /* Name of the file */
char *dir; /* current directory */
/* dynamic buffers and curser position for editor: */
long curs1; /*position of the cursor from the beginning of the file. */
long curs2; /*position from the end of the file */
unsigned char *buffers1[MAXBUFF + 1]; /*all data up to curs1 */
unsigned char *buffers2[MAXBUFF + 1]; /*all data from end of file down to curs2 */
/* search variables */
long search_start; /* First character to start searching from */
int found_len; /* Length of found string or 0 if none was found */
long found_start; /* the found word from a search - start position */
/* display information */
long last_byte; /* Last byte of file */
long start_display; /* First char displayed */
long start_col; /* First displayed column, negative */
long curs_row; /*row position of curser on the screen */
long curs_col; /*column position on screen */
int force; /* how much of the screen do we redraw? */
unsigned char overwrite;
unsigned char modified; /*has the file been changed?: 1 if char inserted or
deleted at all since last load or save */
#ifdef MIDNIGHT
int delete_file; /* has the file been created in edit_load_file? Delete
it at end of editing when it hasn't been modified
or saved */
#endif
unsigned char highlight;
long prev_col; /*recent column position of the curser - used when moving
up or down past lines that are shorter than the current line */
long curs_line; /*line number of the cursor. */
long start_line; /*line nummber of the top of the page */
/* file info */
long total_lines; /*total lines in the file */
long mark1; /*position of highlight start */
long mark2; /*position of highlight end */
int column1; /*position of column highlight start */
int column2; /*position of column highlight end */
long bracket; /*position of a matching bracket */
/* undo stack and pointers */
unsigned long stack_pointer;
long *undo_stack;
unsigned long stack_size;
unsigned long stack_size_mask;
unsigned long stack_bottom;
struct stat stat;
int to_here; /* dummy marker */
/* macro stuff */
int macro_i; /* -1 if not recording index to macro[] otherwise */
struct macro macro[MAX_MACRO_LENGTH];
};
typedef struct editor_widget WEdit;
#ifndef MIDNIGHT
void edit_render_expose (WEdit * edit, XExposeEvent * xexpose);
void edit_render_tidbits (struct cool_widget *w);
int eh_editor (CWidget * w, XEvent * xevent, CEvent * cwevent);
void edit_draw_menus (Window parent, int x, int y);
void edit_run_make (void);
void edit_change_directory (void);
int edit_man_page_cmd (WEdit * edit);
void edit_search_replace_dialog (Window parent, int x, int y, char **search_text, char **replace_text, char **arg_order, char *heading, int option);
void edit_search_dialog (WEdit * edit, char **search_text);
long edit_find (long search_start, unsigned char *exp, int *len, long last_byte, int (*get_byte) (void *, long), void *data);
void edit_set_foreground_colors (unsigned long normal, unsigned long bold, unsigned long italic);
void edit_set_background_colors (unsigned long normal, unsigned long abnormal, unsigned long marked, unsigned long marked_abnormal, unsigned long highlighted);
void edit_set_cursor_color (unsigned long c);
void draw_options_dialog (Window parent, int x, int y);
void CRefreshEditor (WEdit * edit);
void edit_set_user_command (void (*func) (WEdit *, int));
void edit_draw_this_line_proportional (WEdit * edit, long b, int curs_row, int start_column, int end_column);
unsigned char get_international_character (unsigned char key_press);
void edit_set_user_key_function (int (*user_def_key_func) (unsigned int, unsigned int, KeySym keysym));
#else
int edit_drop_hotkey_menu (WEdit * e, int key);
void edit_menu_cmd (WEdit * e);
void edit_init_menu_emacs (void);
void edit_init_menu_normal (void);
void edit_done_menu (void);
int edit_raw_key_query (char *heading, char *query, int cancel);
char *strcasechr (const unsigned char *s, int c);
int edit (const char *_file, int line);
int edit_translate_key (WEdit * edit, unsigned int x_keycode, long x_key, int x_state, int *cmd, int *ch);
#endif
int edit_get_byte (WEdit * edit, long byte_index);
char *edit_get_buffer_as_text (WEdit * edit);
int edit_load_file (WEdit * edit, const char *filename, const char *text, unsigned long text_size);
int edit_count_lines (WEdit * edit, long current, int upto);
long edit_move_forward (WEdit * edit, long current, int lines, long upto);
long edit_move_forward3 (WEdit * edit, long current, int cols, long upto);
long edit_move_backward (WEdit * edit, long current, int lines);
void edit_scroll_screen_over_cursor (WEdit * edit);
void edit_render_keypress (WEdit * edit);
void edit_scroll_upward (WEdit * edit, unsigned long i);
void edit_scroll_downward (WEdit * edit, int i);
void edit_scroll_right (WEdit * edit, int i);
void edit_scroll_left (WEdit * edit, int i);
int edit_get_col (WEdit * edit);
long edit_bol (WEdit * edit, long current);
long edit_eol (WEdit * edit, long current);
void edit_update_curs_row (WEdit * edit);
void edit_update_curs_col (WEdit * edit);
void edit_block_copy_cmd (WEdit * edit);
void edit_block_move_cmd (WEdit * edit);
int edit_block_delete_cmd (WEdit * edit);
int edit_delete (WEdit * edit);
void edit_insert (WEdit * edit, int c);
int edit_cursor_move (WEdit * edit, long increment);
void edit_push_action (WEdit * edit, long c,...);
void edit_push_key_press (WEdit * edit);
void edit_insert_ahead (WEdit * edit, int c);
int edit_save_file (WEdit * edit, const char *filename);
int edit_save_cmd (WEdit * edit);
int edit_save_confirm_cmd (WEdit * edit);
int edit_save_as_cmd (WEdit * edit);
WEdit *edit_init (WEdit * edit, int lines, int columns, const char *filename, const char *text, const char *dir, unsigned long text_size);
int edit_clean (WEdit * edit);
int edit_renew (WEdit * edit);
int edit_new_cmd (WEdit * edit);
int edit_reload (WEdit * edit, const char *filename, const char *text, const char *dir, unsigned long text_size);
int edit_load_cmd (WEdit * edit);
void edit_mark_cmd (WEdit * edit, int unmark);
void edit_set_markers (WEdit * edit, long m1, long m2, int c1, int c2);
void edit_push_markers (WEdit * edit);
void edit_quit_cmd (WEdit * edit);
void edit_replace_cmd (WEdit * edit, int again);
void edit_search_cmd (WEdit * edit, int again);
int edit_save_block_cmd (WEdit * edit);
int edit_insert_file_cmd (WEdit * edit);
int edit_insert_file (WEdit * edit, const char *filename);
void edit_block_process_cmd (WEdit * edit, const char *shell_cmd, int block);
char *catstrs (const char *first,...);
void edit_refresh_cmd (WEdit * edit);
void edit_date_cmd (WEdit * edit);
void edit_goto_cmd (WEdit * edit);
int eval_marks (WEdit * edit, long *start_mark, long *end_mark);
void edit_status (WEdit * edit);
int edit_execute_command (WEdit * edit, int command, int char_for_insertion);
int edit_execute_key_command (WEdit * edit, int command, int char_for_insertion);
void edit_update_screen (WEdit * edit);
int edit_printf (WEdit * e, const char *fmt,...);
int edit_print_string (WEdit * e, const char *s);
void edit_move_to_line (WEdit * e, long line);
void edit_move_display (WEdit * e, long line);
void edit_word_wrap (WEdit * edit);
unsigned char *edit_get_block (WEdit * edit, long start, long finish, int *l);
int edit_sort_cmd (WEdit * edit);
void edit_help_cmd (WEdit * edit);
void edit_left_word_move (WEdit * edit);
void edit_right_word_move (WEdit * edit);
void edit_get_selection (WEdit * edit);
int edit_save_macro_cmd (WEdit * edit, struct macro macro[], int n);
int edit_load_macro_cmd (WEdit * edit, struct macro macro[], int *n, int k);
void edit_delete_macro_cmd (WEdit * edit);
int edit_copy_to_X_buf_cmd (WEdit * edit);
int edit_cut_to_X_buf_cmd (WEdit * edit);
void edit_paste_from_X_buf_cmd (WEdit * edit);
void edit_paste_from_history (WEdit *edit);
void edit_split_filename (WEdit * edit, char *name);
#ifdef MIDNIGHT
# ifndef _
# define _(s) s
# endif
# define gettext(s) (s)
# define N_(s) s
# define gettext_noop(s) (s)
# endif
/* put OS2/NT/WIN95 defines here */
# ifdef OS2_NT
# define MY_O_TEXT O_TEXT
# else
# define MY_O_TEXT 0
# endif
# define FONT_PIX_PER_LINE 1
# define FONT_MEAN_WIDTH 1
# define get_sys_error(s) (s)
# define open mc_open
# define close(f) mc_close(f)
# define read(f,b,c) mc_read(f,b,c)
# define write(f,b,c) mc_write(f,b,c)
# define stat(f,s) mc_stat(f,s)
# define mkdir(s,m) mc_mkdir(s,m)
# define itoa MY_itoa
# define edit_get_load_file(d,f,h) input_dialog (h, " Enter file name: ", f)
# define edit_get_save_file(d,f,h) input_dialog (h, " Enter file name: ", f)
# define CMalloc(x) malloc(x)
# define set_error_msg(s) edit_init_error_msg = strdup(s)
# ifdef _EDIT_C
# define edit_error_dialog(h,s) set_error_msg(s)
char *edit_init_error_msg = NULL;
# else /* ! _EDIT_C */
# define edit_error_dialog(h,s) query_dialog (h, s, 0, 1, "Cancel")
# define edit_message_dialog(h,s) query_dialog (h, s, 0, 1, "Ok")
extern char *edit_init_error_msg;
# endif /* ! _EDIT_C */
# define get_error_msg(s) edit_init_error_msg
# define edit_query_dialog2(h,t,a,b) query_dialog(h,t,0,2,a,b)
# define edit_query_dialog3(h,t,a,b,c) query_dialog(h,t,0,3,a,b,c)
# define edit_query_dialog4(h,t,a,b,c,d) query_dialog(h,t,0,4,a,b,c,d)
#else /* ! MIDNIGHT */
# define MY_O_TEXT 0
# define WIN_MESSAGES edit->widget->mainid, 20, 20
# define edit_get_load_file(d,f,h) CGetLoadFile(WIN_MESSAGES,d,f,h)
# define edit_get_save_file(d,f,h) CGetSaveFile(WIN_MESSAGES,d,f,h)
# define edit_error_dialog(h,t) CErrorDialog(WIN_MESSAGES,h,"%s",t)
# define edit_message_dialog(h,t) CMessageDialog(WIN_MESSAGES,0,h,"%s",t)
# define edit_query_dialog2(h,t,a,b) CQueryDialog(WIN_MESSAGES,h,t,a,b,0)
# define edit_query_dialog3(h,t,a,b,c) CQueryDialog(WIN_MESSAGES,h,t,a,b,c,0)
# define edit_query_dialog4(h,t,a,b,c,d) CQueryDialog(WIN_MESSAGES,h,t,a,b,c,d,0)
#endif /* ! MIDNIGHT */
extern char *home_dir;
#define NUM_SELECTION_HISTORY 32
#ifdef _EDIT_C
struct selection selection =
{0, 0};
int current_selection = 0;
/* Note: selection.text = selection_history[current_selection].text */
struct selection selection_history[NUM_SELECTION_HISTORY] =
{
{0, 0},
{0, 0},
{0, 0},
{0, 0},
{0, 0},
{0, 0},
{0, 0},
{0, 0},
{0, 0},
{0, 0},
};
#ifdef MIDNIGHT
/*
what editor are we going to emulate? one of EDIT_KEY_EMULATION_NORMAL
or EDIT_KEY_EMULATION_EMACS
*/
int edit_key_emulation = EDIT_KEY_EMULATION_NORMAL;
#endif /* ! MIDNIGHT */
int option_word_wrap_line_length = 72;
int option_typewriter_wrap = 0;
int option_auto_para_formatting = 0;
int option_international_characters = 0;
int option_tab_spacing = 8;
int option_fill_tabs_with_spaces = 0;
int option_return_does_auto_indent = 1;
int option_backspace_through_tabs = 0;
int option_fake_half_tabs = 1;
int option_save_mode = 0;
int option_backup_ext_int = -1;
int option_find_bracket = 1;
int option_max_undo = 8192;
int option_editor_fg_normal = 26;
int option_editor_fg_bold = 8;
int option_editor_fg_italic = 10;
int option_edit_right_extreme = 0;
int option_edit_left_extreme = 0;
int option_edit_top_extreme = 0;
int option_edit_bottom_extreme = 0;
int option_editor_bg_normal = 1;
int option_editor_bg_abnormal = 0;
int option_editor_bg_marked = 2;
int option_editor_bg_marked_abnormal = 9;
int option_editor_bg_highlighted = 12;
int option_editor_fg_cursor = 18;
char *option_whole_chars_search = "0123456789abcdefghijklmnopqrstuvwxyz_";
char *option_whole_chars_move = "0123456789abcdefghijklmnopqrstuvwxyz_; ,[](){}";
char *option_backup_ext = "~";
#else /* ! _EDIT_C */
extern struct selection selection;
extern struct selection selection_history[];
extern int current_selection;
#ifdef MIDNIGHT
/*
what editor are we going to emulate? one of EDIT_KEY_EMULATION_NORMAL
or EDIT_KEY_EMULATION_EMACS
*/
extern int edit_key_emulation;
#endif /* ! MIDNIGHT */
extern int option_word_wrap_line_length;
extern int option_typewriter_wrap;
extern int option_auto_para_formatting;
extern int option_international_characters;
extern int option_tab_spacing;
extern int option_fill_tabs_with_spaces;
extern int option_return_does_auto_indent;
extern int option_backspace_through_tabs;
extern int option_fake_half_tabs;
extern int option_save_mode;
extern int option_backup_ext_int;
extern int option_find_bracket;
extern int option_max_undo;
extern int option_editor_fg_normal;
extern int option_editor_fg_bold;
extern int option_editor_fg_italic;
extern int option_edit_right_extreme;
extern int option_edit_left_extreme;
extern int option_edit_top_extreme;
extern int option_edit_bottom_extreme;
extern int option_editor_bg_normal;
extern int option_editor_bg_abnormal;
extern int option_editor_bg_marked;
extern int option_editor_bg_marked_abnormal;
extern int option_editor_bg_highlighted;
extern int option_editor_fg_cursor;
extern char *option_whole_chars_search;
extern char *option_whole_chars_move;
extern char *option_backup_ext;
extern int edit_confirm_save;
#endif /* ! _EDIT_C */

294
edit/edit_key_translator.c Normal file
View File

@ -0,0 +1,294 @@
/*
these #defines are probably the ones most people will be interested in.
You can use these two #defines to hard code the key mappings --- just
uncomment the one you want. But only if you have trouble with learn
keys (which is unlikely).
*/
/* KEY_BACKSPACE is the key learned in the learn keys menu : */
#define OUR_BACKSPACE_KEY KEY_BACKSPACE
/* ...otherwise ctrl-h : */
/* #define OUR_BACKSPACE_KEY XCTRL ('h') */
/* ...otherwise 127 or DEL in ascii : */
/* #define OUR_BACKSPACE_KEY 0177 */
/* KEY_DC is the key learned in the learn keys menu */
#define OUR_DELETE_KEY KEY_DC
/* ...otherwise ctrl-d : */
/* #define OUR_DELETE_KEY XCTRL ('d') */
/* ...otherwise 127 or DEL in ascii : */
/* #define OUR_DELETE_KEY 0177 */
/*
This is #include'd into the function edit_translate_key in edit.c.
This sequence of code takes 'x_state' and 'x_key' and translates them
into either 'command' or 'char_for_insertion'. 'x_key' holds one of
KEY_NPAGE, KEY_HOME etc., and 'x_state' holds a bitwise inclusive OR of
CONTROL_PRESSED, ALT_PRESSED or SHIFT_PRESSED, although none may
be supported.
'command' is one of the editor commands editcmddef.h.
Almost any C code can go into this file. The code below is an example
that may by appended or modified by the user.
*/
/* look in this file for the list of commands : */
#include "editcmddef.h"
#define KEY_NUMLOCK ???
/* ordinary translations. (Some of this may be redundant.) Note that keys listed
first take priority when a key is assigned to more than one command */
static long *key_map;
static long cooledit_key_map[] =
{OUR_BACKSPACE_KEY, CK_BackSpace, OUR_DELETE_KEY, CK_Delete,
XCTRL ('d'), CK_Delete, '\n', CK_Enter,
KEY_PPAGE, CK_Page_Up, KEY_NPAGE, CK_Page_Down, KEY_LEFT, CK_Left,
KEY_RIGHT, CK_Right, KEY_UP, CK_Up, KEY_DOWN, CK_Down, ALT ('\t'), CK_Return, ALT ('\n'), CK_Return,
KEY_HOME, CK_Home, KEY_END, CK_End, '\t', CK_Tab, XCTRL ('u'), CK_Undo, KEY_IC, CK_Toggle_Insert,
XCTRL ('o'), CK_Load, KEY_F (3), CK_Mark, KEY_F (5), CK_Copy,
KEY_F (6), CK_Move, KEY_F (8), CK_Remove, KEY_F (12), CK_Save_As,
KEY_F (2), CK_Save, XCTRL ('n'), CK_New,
XCTRL ('l'), CK_Refresh, ESC_CHAR, CK_Exit, KEY_F (10), CK_Exit,
KEY_F (19), /*C formatter */ CK_Pipe_Block (0),
XCTRL ('p'), /*spell check */ CK_Pipe_Block (1),
KEY_F (15), CK_Insert_File,
XCTRL ('f'), CK_Save_Block, KEY_F (1), CK_Help,
ALT ('t'), CK_Sort, ALT ('m'), CK_Mail,
XCTRL ('z'), CK_Word_Left, XCTRL ('x'), CK_Word_Right,
KEY_F (4), CK_Replace, KEY_F (7), CK_Find, KEY_F (14), CK_Replace_Again,
XCTRL ('h'), CK_BackSpace, ALT ('l'), CK_Goto, ALT ('L'), CK_Goto, XCTRL ('y'), CK_Delete_Line,
KEY_F (17), CK_Find_Again, ALT ('p'), CK_Paragraph_Format, 0};
static long emacs_key_map[] =
{OUR_BACKSPACE_KEY, CK_BackSpace, OUR_DELETE_KEY, CK_Delete, '\n', CK_Enter,
KEY_PPAGE, CK_Page_Up, KEY_NPAGE, CK_Page_Down, KEY_LEFT, CK_Left,
KEY_RIGHT, CK_Right, KEY_UP, CK_Up, KEY_DOWN, CK_Down, ALT ('\t'), CK_Return, ALT ('\n'), CK_Return,
KEY_HOME, CK_Home, KEY_END, CK_End, '\t', CK_Tab, XCTRL ('u'), CK_Undo, KEY_IC, CK_Toggle_Insert,
XCTRL ('o'), CK_Load, KEY_F (3), CK_Mark, KEY_F (5), CK_Copy,
KEY_F (6), CK_Move, KEY_F (8), CK_Remove, KEY_F (12), CK_Save_As,
KEY_F (2), CK_Save, ALT ('p'), CK_Paragraph_Format,
ALT ('t'), CK_Sort,
XCTRL ('a'), CK_Home, XCTRL ('e'), CK_End,
XCTRL ('b'), CK_Left, XCTRL ('f'), CK_Right,
XCTRL ('n'), CK_Down, XCTRL ('p'), CK_Up,
XCTRL ('d'), CK_Delete,
XCTRL ('v'), CK_Page_Down, ALT ('v'), CK_Page_Up,
XCTRL ('@'), CK_Mark,
XCTRL ('k'), CK_Delete_To_Line_End,
XCTRL ('s'), CK_Find,
ALT ('b'), CK_Word_Left, ALT ('f'), CK_Word_Right,
XCTRL ('w'), CK_XCut,
XCTRL ('y'), CK_XPaste,
ALT ('w'), CK_XStore,
XCTRL ('l'), CK_Refresh, ESC_CHAR, CK_Exit, KEY_F (10), CK_Exit,
KEY_F (19), /*C formatter */ CK_Pipe_Block (0),
ALT ('$'), /*spell check */ CK_Pipe_Block (1),
KEY_F (15), CK_Insert_File,
KEY_F (1), CK_Help,
KEY_F (4), CK_Replace, KEY_F (7), CK_Find, KEY_F (14), CK_Replace_Again,
XCTRL ('h'), CK_BackSpace, ALT ('l'), CK_Goto, ALT ('L'), CK_Goto,
KEY_F (17), CK_Find_Again,
ALT ('<'), CK_Beginning_Of_Text,
ALT ('>'), CK_End_Of_Text,
0, 0};
static long key_pad_map[10] =
{XCTRL ('o'), KEY_END, KEY_DOWN, KEY_NPAGE, KEY_LEFT,
KEY_DOWN, KEY_RIGHT, KEY_HOME, KEY_UP, KEY_PPAGE};
#define DEFAULT_NUM_LOCK 0
static int num_lock = DEFAULT_NUM_LOCK;
int i = 0;
switch (edit_key_emulation) {
case EDIT_KEY_EMULATION_NORMAL:
key_map = cooledit_key_map;
break;
case EDIT_KEY_EMULATION_EMACS:
key_map = emacs_key_map;
if (x_key == XCTRL ('x')) {
int ext_key;
ext_key = edit_raw_key_query (" Ctrl-X ", _(" Emacs key: "), 0);
switch (ext_key) {
case 's':
command = CK_Save;
goto fin;
case 'x':
command = CK_Exit;
goto fin;
case 'k':
command = CK_New;
goto fin;
case 'e':
command = CK_Macro (edit_raw_key_query (_(" Execute Macro "), _(" Press macro hotkey: "), 1));
if (command == CK_Macro (0))
command = -1;
goto fin;
}
goto fin;
}
break;
}
if (x_key == XCTRL ('q')) {
char_for_insertion = edit_raw_key_query (_(" Insert Literal "), _(" Press any key: "), 0);
goto fin;
}
if (x_key == XCTRL ('a') && edit_key_emulation != EDIT_KEY_EMULATION_EMACS) {
command = CK_Macro (edit_raw_key_query (" Execute Macro ", " Press macro hotkey: ", 1));
if (command == CK_Macro (0))
command = -1;
goto fin;
}
/* edit is a pointer to the widget */
if (edit)
if (x_key == XCTRL ('r')) {
command = edit->macro_i < 0 ? CK_Begin_Record_Macro : CK_End_Record_Macro;
goto fin;
}
/* if (x_key == KEY_NUMLOCK) {
num_lock = 1 - num_lock;
return 1;
}
*/
/* first translate the key-pad */
if (num_lock) {
if (x_key >= '0' && x_key <= '9') {
x_key = key_pad_map[x_key - '0'];
}
if (x_key == '.') {
x_key = KEY_DC;
}
}
if ((x_state & SHIFT_PRESSED) && (x_state & CONTROL_PRESSED)) {
switch (x_key) {
case KEY_PPAGE:
command = CK_Beginning_Of_Text_Highlight;
goto fin;
case KEY_NPAGE:
command = CK_End_Of_Text_Highlight;
goto fin;
case KEY_LEFT:
command = CK_Word_Left_Highlight;
goto fin;
case KEY_RIGHT:
command = CK_Word_Right_Highlight;
goto fin;
}
}
if ((x_state & SHIFT_PRESSED) && !(x_state & CONTROL_PRESSED)) {
switch (x_key) {
case KEY_PPAGE:
command = CK_Page_Up_Highlight;
goto fin;
case KEY_NPAGE:
command = CK_Page_Down_Highlight;
goto fin;
case KEY_LEFT:
command = CK_Left_Highlight;
goto fin;
case KEY_RIGHT:
command = CK_Right_Highlight;
goto fin;
case KEY_UP:
command = CK_Up_Highlight;
goto fin;
case KEY_DOWN:
command = CK_Down_Highlight;
goto fin;
case KEY_HOME:
command = CK_Home_Highlight;
goto fin;
case KEY_END:
command = CK_End_Highlight;
goto fin;
case KEY_IC:
command = CK_XPaste;
goto fin;
case KEY_DC:
command = CK_XCut;
goto fin;
}
}
/* things that need a control key */
if (x_state & CONTROL_PRESSED) {
switch (x_key) {
case KEY_F (2):
command = CK_Save_As;
goto fin;
case KEY_F (4):
command = CK_Replace_Again;
goto fin;
case KEY_F (7):
command = CK_Find_Again;
goto fin;
case KEY_BACKSPACE:
command = CK_Undo;
goto fin;
case KEY_PPAGE:
command = CK_Beginning_Of_Text;
goto fin;
case KEY_NPAGE:
command = CK_End_Of_Text;
goto fin;
case KEY_UP:
command = CK_Scroll_Up;
goto fin;
case KEY_DOWN:
command = CK_Scroll_Down;
goto fin;
case KEY_LEFT:
command = CK_Word_Left;
goto fin;
case KEY_RIGHT:
command = CK_Word_Right;
goto fin;
case KEY_IC:
command = CK_XStore;
goto fin;
case KEY_DC:
command = CK_Remove;
goto fin;
}
}
/* an ordinary insertable character */
if (x_key < 256 && is_printable (x_key)) {
char_for_insertion = x_key;
goto fin;
}
/* other commands */
i = 0;
while (key_map[i] != x_key && (key_map[i] || key_map[i + 1]))
i += 2;
command = key_map[i + 1];
if (command)
goto fin;
/* Function still not found for this key, so try macro's */
/* This allows the same macro to be
enabled by either eg "ALT('f')" or "XCTRL('f')" or "XCTRL('a'), 'f'" */
/* key.h: #define ALT(x) (0x200 | (x)) */
if (x_key & ALT (0)) { /* is an alt key ? */
command = CK_Macro (x_key - ALT (0));
goto fin;
}
/* key.h: #define XCTRL(x) ((x) & 31) */
if (x_key < ' ') { /* is a ctrl key ? */
command = CK_Macro (x_key);
goto fin;
}
fin:

2534
edit/editcmd.c Normal file

File diff suppressed because it is too large Load Diff

138
edit/editcmddef.h Normal file
View File

@ -0,0 +1,138 @@
#ifndef __EDIT_CMD_DEF_H
#define __EDIT_CMD_DEF_H
/* in the distant future, keyboards will be invented with a
seperate key for each one of these commands *sigh* */
/* cursor movements */
#define CK_No_Command -1
#define CK_BackSpace 1
#define CK_Delete 2
#define CK_Enter 3
#define CK_Page_Up 4
#define CK_Page_Down 5
#define CK_Left 6
#define CK_Right 7
#define CK_Word_Left 8
#define CK_Word_Right 9
#define CK_Up 10
#define CK_Down 11
#define CK_Home 12
#define CK_End 13
#define CK_Tab 14
#define CK_Undo 15
#define CK_Beginning_Of_Text 16
#define CK_End_Of_Text 17
#define CK_Scroll_Up 18
#define CK_Scroll_Down 19
#define CK_Return 20
#define CK_Begin_Page 21
#define CK_End_Page 22
#define CK_Delete_Word_Left 23
#define CK_Delete_Word_Right 24
#define CK_Paragraph_Up 25
#define CK_Paragraph_Down 26
/* file commands */
#define CK_Save 101
#define CK_Load 102
#define CK_New 103
#define CK_Save_As 104
/* block commands */
#define CK_Mark 201
#define CK_Copy 202
#define CK_Move 203
#define CK_Remove 204
#define CK_Unmark 206
#define CK_Save_Block 207
/* search and replace */
#define CK_Find 301
#define CK_Find_Again 302
#define CK_Replace 303
#define CK_Replace_Again 304
/* misc */
#define CK_Insert_File 401
#define CK_Exit 402
#define CK_Toggle_Insert 403
#define CK_Help 404
#define CK_Date 405
#define CK_Refresh 406
#define CK_Goto 407
#define CK_Delete_Line 408
#define CK_Delete_To_Line_End 409
#define CK_Delete_To_Line_Begin 410
#define CK_Man_Page 411
#define CK_Sort 412
#define CK_Mail 413
#define CK_Cancel 414
#define CK_Complete 415
#define CK_Paragraph_Format 416
/* application control */
#define CK_Save_Desktop 451
#define CK_New_Window 452
#define CK_Cycle 453
#define CK_Menu 454
#define CK_Save_And_Quit 455
#define CK_Run_Another 456
#define CK_Check_Save_And_Quit 457
/* macro */
#define CK_Begin_Record_Macro 501
#define CK_End_Record_Macro 502
#define CK_Delete_Macro 503
/* highlight commands */
#define CK_Page_Up_Highlight 604
#define CK_Page_Down_Highlight 605
#define CK_Left_Highlight 606
#define CK_Right_Highlight 607
#define CK_Word_Left_Highlight 608
#define CK_Word_Right_Highlight 609
#define CK_Up_Highlight 610
#define CK_Down_Highlight 611
#define CK_Home_Highlight 612
#define CK_End_Highlight 613
#define CK_Beginning_Of_Text_Highlight 614
#define CK_End_Of_Text_Highlight 615
#define CK_Begin_Page_Highlight 616
#define CK_End_Page_Highlight 617
#define CK_Scroll_Up_Highlight 618
#define CK_Scroll_Down_Highlight 619
#define CK_Paragraph_Up_Highlight 620
#define CK_Paragraph_Down_Highlight 621
/* X clipboard operations */
#define CK_XStore 701
#define CK_XCut 702
#define CK_XPaste 703
#define CK_Selection_History 704
#ifdef MIDNIGHT /* cooledit now has its own full-featured script editor and executor */
/*
Process a block through a shell command: CK_Pipe_Block(i) executes shell_cmd[i].
shell_cmd[i] must process the file ~/cooledit.block and output ~/cooledit.block
which is then inserted into the text in place of the original block. shell_cmd[i] must
also produce a file homedir/cooledit.error . If this file is not empty an error will
have been assumed to have occured, and the block will not be replaced.
TODO: bring up a viewer to display the error message instead of inserting
it into the text, which is annoying.
*/
#define CK_Pipe_Block(i) (1000+(i))
#define SHELL_COMMANDS_i {"/.cedit/edit.indent.rc", "/.cedit/edit.spell.rc", /* and so on */ 0};
#else
#define CK_User_Command(i) (1000+(i))
#endif
/* execute a macro */
#define CK_Macro(i) (2000+(i))
#define CK_Last_Macro CK_Macro(0x7FFF)
#endif

633
edit/editdraw.c Normal file
View File

@ -0,0 +1,633 @@
/* editor text drawing.
Copyright (C) 1996, 1997 the Free Software Foundation
Authors: 1996, 1997 Paul Sheer
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You 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. */
#include <config.h>
#include "edit.h"
#define MAX_LINE_LEN 1024
#ifndef MIDNIGHT
#include "app_glob.c"
#include "coollocal.h"
#else
#include "src/mad.h"
#endif
static void status_string (WEdit * edit, char *s, int w, int fill, int font_width)
{
int i;
char t[160]; /* 160 just to be sure */
/* The field lengths just prevents the status line from shortening to much */
sprintf (t, "[%c%c%c%c] %2ld:%3ld+%2ld=%3ld/%3ld - *%-4ld/%4ldb=%3d",
edit->mark1 != edit->mark2 ? 'B' : '-',
edit->modified ? 'M' : '-', edit->macro_i < 0 ? '-' : 'R',
edit->overwrite == 0 ? '-' : 'O',
edit->curs_col / font_width, edit->start_line + 1, edit->curs_row,
edit->curs_line + 1, edit->total_lines + 1, edit->curs1,
edit->last_byte, edit->curs1 < edit->last_byte
? edit_get_byte (edit, edit->curs1) : -1);
sprintf (s, "%.*s", w + 1, t);
i = strlen (s);
s[i] = ' ';
i = w;
do {
if (strchr (" +-*=/:b", s[i])) /* chop off the last word/number */
break;
s[i] = fill;
} while (i--);
s[i] = fill;
s[w] = 0;
}
#ifdef MIDNIGHT
/* how to get as much onto the status line as is numerically possible :) */
void edit_status (WEdit * edit)
{
int w, i, t;
char *s;
w = edit->widget.cols - (edit->have_frame * 2);
s = malloc (w + 15);
if (w < 4)
w = 4;
memset (s, ' ', w);
attrset (SELECTED_COLOR);
if (w > 4) {
widget_move (edit, edit->have_frame, edit->have_frame);
i = w > 24 ? 18 : w - 6;
i = i < 13 ? 13 : i;
sprintf (s, "%s", name_trunc (edit->filename ? edit->filename : "", i));
i += strlen (s);
s[strlen (s)] = ' ';
t = w - 20;
if (t < 0)
t = 0;
status_string (edit, s + 20, t, ' ', 1);
} else {
s[w] = 0;
}
printw ("%.*s", w, s);
attrset (NORMAL_COLOR);
free (s);
}
#else
extern int fixed_font;
void rerender_text (CWidget * wdt);
void edit_status (WEdit * edit)
{
if ((edit->widget->options & EDITOR_NO_TEXT)) {
return;
} else {
int w, i, t;
CWidget *wdt;
char id[33];
char s[160];
w = edit->num_widget_columns - 1;
if (w > 150)
w = 150;
if (w < 0)
w = 0;
memset (s, 0, w);
if (w > 1) {
i = w > 24 ? 18 : w - 6;
i = i < 13 ? 13 : i;
sprintf (s, "%s", name_trunc (edit->filename ? edit->filename : "", i));
i = strlen (s);
s[i] = ' ';
s[i+1] = ' ';
t = w - i - 2;
if (t < 0)
t = 0;
status_string (edit, s + i + 2, t, 0, FONT_MEAN_WIDTH);
}
s[w] = 0;
strcpy (id, edit->widget->ident);
strcat (id, ".text");
wdt = CIdent (id);
free (wdt->text);
wdt->text = strdup (s);
CSetWidgetSize (id, edit->widget->width, wdt->height);
rerender_text (wdt);
}
}
#endif
/* boolean */
int cursor_in_screen (WEdit * edit, long row)
{
if (row < 0 || row >= edit->num_widget_lines)
return 0;
else
return 1;
}
/* returns rows from the first displayed line to the cursor */
int cursor_from_display_top (WEdit * edit)
{
if (edit->curs1 < edit->start_display)
return -edit_move_forward (edit, edit->curs1, 0, edit->start_display);
else
return edit_move_forward (edit, edit->start_display, 0, edit->curs1);
}
/* returns how far the cursor is out of the screen */
int cursor_out_of_screen (WEdit * edit)
{
int row = cursor_from_display_top (edit);
if (row >= edit->num_widget_lines)
return row - edit->num_widget_lines + 1;
if (row < 0)
return row;
return 0;
}
#ifndef MIDNIGHT
extern unsigned char per_char[256];
int edit_width_of_long_printable (int c);
#endif
/* this scrolls the text so that cursor is on the screen */
void edit_scroll_screen_over_cursor (WEdit * edit)
{
int p, l;
int outby;
p = edit_get_col (edit);
edit_update_curs_row (edit);
#ifdef MIDNIGHT
outby = p + edit->start_col - edit->num_widget_columns + 1 + (EDIT_RIGHT_EXTREME + edit->found_len);
#else
outby = p + edit->start_col - edit->widget->width + 7 + (EDIT_RIGHT_EXTREME + edit->found_len) * FONT_MEAN_WIDTH + edit_width_of_long_printable (edit_get_byte (edit, edit->curs1));
#endif
if (outby > 0)
edit_scroll_right (edit, outby);
#ifdef MIDNIGHT
outby = EDIT_LEFT_EXTREME - p - edit->start_col;
#else
outby = EDIT_LEFT_EXTREME * FONT_MEAN_WIDTH - p - edit->start_col;
#endif
if (outby > 0)
edit_scroll_left (edit, outby);
p = edit->curs_row;
l = 0;
if (edit->found_len != 0)
l = edit->num_widget_lines / 5;
outby = p - edit->num_widget_lines + 1 + EDIT_BOTTOM_EXTREME + l;
if (outby > 0)
edit_scroll_downward (edit, outby);
outby = EDIT_TOP_EXTREME - p + l;
if (outby > 0)
edit_scroll_upward (edit, outby);
edit_update_curs_row (edit);
}
#ifndef MIDNIGHT
#define CACHE_WIDTH 256
#define CACHE_HEIGHT 128
int EditExposeRedraw = 0;
int EditClear = 0;
/* background colors: marked is refers to mouse highlighting, highlighted refers to a found string. */
unsigned long edit_abnormal_color, edit_marked_abnormal_color;
unsigned long edit_highlighted_color, edit_marked_color;
unsigned long edit_normal_background_color;
/* foreground colors */
unsigned long edit_normal_foreground_color, edit_bold_color;
unsigned long edit_italic_color;
/* cursor color */
unsigned long edit_cursor_color;
void edit_set_foreground_colors (unsigned long normal, unsigned long bold, unsigned long italic)
{
edit_normal_foreground_color = normal;
edit_bold_color = bold;
edit_italic_color = italic;
}
void edit_set_background_colors (unsigned long normal, unsigned long abnormal, unsigned long marked, unsigned long marked_abnormal, unsigned long highlighted)
{
edit_abnormal_color = abnormal;
edit_marked_abnormal_color = marked_abnormal;
edit_marked_color = marked;
edit_highlighted_color = highlighted;
edit_normal_background_color = normal;
}
void edit_set_cursor_color (unsigned long c)
{
edit_cursor_color = c;
}
#else
#define BOLD_COLOR MARKED_COLOR
#define UNDERLINE_COLOR VIEW_UNDERLINED_COLOR
#define MARK_COLOR SELECTED_COLOR
#define DEF_COLOR NORMAL_COLOR
static void set_color (int font)
{
attrset (font);
}
#define edit_move(x,y) widget_move(edit, y, x);
static void print_to_widget (WEdit * edit, long row, int start_col, float start_col_real, long end_col, unsigned short line[])
{
int x = (float) start_col_real + EDIT_TEXT_HORIZONTAL_OFFSET;
int x1 = start_col + EDIT_TEXT_HORIZONTAL_OFFSET;
int y = row + EDIT_TEXT_VERTICAL_OFFSET;
set_color (DEF_COLOR);
edit_move (x1, y);
hline (' ', end_col + 1 - EDIT_TEXT_HORIZONTAL_OFFSET - x1);
edit_move (x + FONT_OFFSET_X, y + FONT_OFFSET_Y);
{
unsigned short *p = line;
int textchar = ' ';
long style;
while (*p) {
style = (*p) >> 8;
textchar = (*p) & 255;
if (!style || style & MOD_ABNORMAL || style & MOD_CURSOR)
set_color (DEF_COLOR);
if (style & MOD_ABNORMAL)
textchar = '.';
if (style & MOD_HIGHLIGHTED) {
set_color (BOLD_COLOR);
} else if (style & MOD_MARKED) {
set_color (MARK_COLOR);
}
if (style & MOD_UNDERLINED) {
set_color (UNDERLINE_COLOR);
}
if (style & MOD_BOLD) {
set_color (BOLD_COLOR);
}
addch (textchar);
p++;
}
}
}
/* b pointer to begining of line */
static void edit_draw_this_line (WEdit * edit, long b, long row, long start_col, long end_col)
{
static unsigned short line[MAX_LINE_LEN];
unsigned short *p = line;
long m1 = 0, m2 = 0, q;
int col, start_col_real;
unsigned int c;
int i;
q = edit_move_forward3 (edit, b, start_col - edit->start_col, 0);
start_col_real = (col = (int) edit_move_forward3 (edit, b, 0, q)) + edit->start_col;
if (col + 16 > -edit->start_col) {
eval_marks (edit, &m1, &m2);
if (row <= edit->total_lines - edit->start_line) {
while (col <= end_col - edit->start_col) {
*p = 0;
if (q == edit->curs1)
*p |= MOD_CURSOR * 256;
if (q >= m1 && q < m2)
*p |= MOD_MARKED * 256;
if (q == edit->bracket)
*p |= MOD_BOLD * 256;
if (q >= edit->found_start && q < edit->found_start + edit->found_len)
*p |= MOD_HIGHLIGHTED * 256;
switch (c = edit_get_byte (edit, q++)) {
case '\n':
col = end_col - edit->start_col + 1; /* quit */
*(p++) |= ' ';
break;
case '\t':
i = TAB_SIZE - ((int) col % TAB_SIZE);
*p |= ' ';
c = *(p++) & (0xFFFF - MOD_CURSOR * 256);
col += i;
while (--i)
*(p++) = c;
break;
case '\r':
break;
default:
if (is_printable (c)) {
*(p++) |= c;
} else {
*(p++) = '.';
*p |= (256 * MOD_ABNORMAL);
}
col++;
break;
}
}
}
} else {
start_col_real = start_col = 0;
}
*p = 0;
print_to_widget (edit, row, start_col, start_col_real, end_col, line);
}
#endif
#ifdef MIDNIGHT
#define key_pending(x) (!is_idle())
#else
int edit_mouse_pending (Window win);
#define edit_draw_this_line edit_draw_this_line_proportional
static int key_pending (WEdit * edit)
{
if (!(edit->force & REDRAW_COMPLETELY) && !EditExposeRedraw)
return CKeyPending ();
return 0;
}
#endif
/* b for pointer to begining of line */
static void edit_draw_this_char (WEdit * edit, long curs, long row)
{
int b = edit_bol (edit, curs);
#ifdef MIDNIGHT
long start_col = edit_move_forward3 (edit, b, 0, curs) + edit->start_col;
edit_draw_this_line (edit, b, row, start_col, start_col);
#else
edit_draw_this_line (edit, b, row, 0, edit->widget->width);
#endif
}
/* cursor must be in screen for other than REDRAW_PAGE passed in force */
void render_edit_text (WEdit * edit, long start_row, long start_column, long end_row, long end_column)
{
long row = 0, curs_row;
static int prev_curs_row = 0;
static long prev_start_display = 0;
static int prev_start_col = 0;
static long prev_curs = 0;
#ifndef MIDNIGHT
static Window prev_win = 0;
#endif
int force = edit->force;
long b;
/*
if the position of the page has not moved then we can draw the cursor character only.
This will prevent line flicker when using arrow keys.
*/
if ((!(force & REDRAW_CHAR_ONLY)) || (force & REDRAW_PAGE)
#ifndef MIDNIGHT
|| prev_win != edit->widget->winid
#endif
) {
if (!(force & REDRAW_IN_BOUNDS)) { /* !REDRAW_IN_BOUNDS means to ignore bounds and redraw whole rows */
start_row = 0;
end_row = edit->num_widget_lines - 1;
start_column = 0;
#ifdef MIDNIGHT
end_column = edit->num_widget_columns - 1;
#else
end_column = edit->widget->width;
#endif
}
if (force & REDRAW_PAGE) {
row = start_row;
b = edit_move_forward (edit, edit->start_display, start_row, 0);
while (row <= end_row) {
if (key_pending (edit))
return;
edit_draw_this_line (edit, b, row, start_column, end_column);
b = edit_move_forward (edit, b, 1, 0);
row++;
}
} else {
curs_row = edit->curs_row;
if (force & REDRAW_BEFORE_CURSOR) {
if (start_row < curs_row) {
long upto = curs_row - 1 <= end_row ? curs_row - 1 : end_row;
row = start_row;
b = edit->start_display;
while (row <= upto) {
if (key_pending (edit))
return;
edit_draw_this_line (edit, b, row, start_column, end_column);
b = edit_move_forward (edit, b, 1, 0);
}
}
}
/* if (force & REDRAW_LINE) { ---> default */
b = edit_bol (edit, edit->curs1);
if (curs_row >= start_row && curs_row <= end_row) {
if (key_pending (edit))
return;
edit_draw_this_line (edit, b, curs_row, start_column, end_column);
}
if (force & REDRAW_AFTER_CURSOR) {
if (end_row > curs_row) {
row = curs_row + 1 < start_row ? start_row : curs_row + 1;
b = edit_move_forward (edit, b, 1, 0);
while (row <= end_row) {
if (key_pending (edit))
return;
edit_draw_this_line (edit, b, row, start_column, end_column);
b = edit_move_forward (edit, b, 1, 0);
row++;
}
}
}
if (force & REDRAW_LINE_ABOVE && curs_row >= 1) {
row = curs_row - 1;
b = edit_move_backward (edit, edit_bol (edit, edit->curs1), 1);
if (row >= start_row && row <= end_row) {
if (key_pending (edit))
return;
edit_draw_this_line (edit, b, row, start_column, end_column);
}
}
if (force & REDRAW_LINE_BELOW && row < edit->num_widget_lines - 1) {
row = curs_row + 1;
b = edit_bol (edit, edit->curs1);
b = edit_move_forward (edit, b, 1, 0);
if (row >= start_row && row <= end_row) {
if (key_pending (edit))
return;
edit_draw_this_line (edit, b, row, start_column, end_column);
}
}
}
} else {
edit_draw_this_char (edit, prev_curs, prev_curs_row);
edit_draw_this_char (edit, edit->curs1, edit->curs_row);
}
edit->force = 0;
prev_curs_row = edit->curs_row;
prev_curs = edit->curs1;
prev_start_display = edit->start_display;
prev_start_col = edit->start_col;
#ifndef MIDNIGHT
prev_win = edit->widget->winid;
#endif
}
#ifndef MIDNIGHT
void edit_convert_expose_to_area (XExposeEvent * xexpose, int *row1, int *col1, int *row2, int *col2)
{
*col1 = xexpose->x - EDIT_TEXT_HORIZONTAL_OFFSET;
*row1 = (xexpose->y - EDIT_TEXT_VERTICAL_OFFSET) / FONT_PIX_PER_LINE;
*col2 = xexpose->x + xexpose->width + EDIT_TEXT_HORIZONTAL_OFFSET + 3;
*row2 = (xexpose->y + xexpose->height - EDIT_TEXT_VERTICAL_OFFSET) / FONT_PIX_PER_LINE;
}
void edit_render_tidbits (CWidget * wdt)
{
int isfocussed;
int w = wdt->width, h = wdt->height;
Window win;
win = wdt->winid;
isfocussed = (win == CGetFocus ());
CSetColor (COLOR_FLAT);
if (isfocussed) {
render_bevel (win, 0, 0, w - 1, h - 1, 3, 1); /*most outer border bevel */
} else {
render_bevel (win, 2, 2, w - 3, h - 3, 1, 1); /*border bevel */
render_bevel (win, 0, 0, w - 1, h - 1, 2, 0); /*most outer border bevel */
}
}
void edit_set_space_width (int s);
extern int option_long_whitespace;
#endif
void edit_render (WEdit * edit, int page, int row_start, int col_start, int row_end, int col_end)
{
int f = 0;
if (page) /* if it was an expose event, 'page' would be set */
edit->force |= REDRAW_PAGE | REDRAW_IN_BOUNDS;
f = edit->force & (REDRAW_PAGE | REDRAW_COMPLETELY);
#ifdef MIDNIGHT
if (edit->force & REDRAW_COMPLETELY)
redraw_labels (edit->widget.parent, (Widget *) edit);
#else
if (option_long_whitespace)
edit_set_space_width (per_char[' '] * 2);
else
edit_set_space_width (per_char[' ']);
edit_set_foreground_colors (
color_palette (option_editor_fg_normal),
color_palette (option_editor_fg_bold),
color_palette (option_editor_fg_italic)
);
edit_set_background_colors (
color_palette (option_editor_bg_normal),
color_palette (option_editor_bg_abnormal),
color_palette (option_editor_bg_marked),
color_palette (option_editor_bg_marked_abnormal),
color_palette (option_editor_bg_highlighted)
);
edit_set_cursor_color (
color_palette (option_editor_fg_cursor)
);
if (!EditExposeRedraw)
set_cursor_position (0, 0, 0, 0, 0, 0, 0, 0, 0);
#endif
render_edit_text (edit, row_start, col_start, row_end, col_end);
if (edit->force) /* edit->force != 0 means a key was pending and the redraw
was halted, so next time we must redraw everything in case stuff
was left undrawn from a previous key press */
edit->force |= REDRAW_PAGE;
#ifndef MIDNIGHT
if (f) {
edit_render_tidbits (edit->widget);
CSetColor (edit_normal_background_color);
CLine (edit->widget->winid, 3, 3, 3, edit->widget->height - 4);
}
#endif
}
#ifndef MIDNIGHT
void edit_render_expose (WEdit * edit, XExposeEvent * xexpose)
{
int row_start, col_start, row_end, col_end;
EditExposeRedraw = 1;
edit->num_widget_lines = (edit->widget->height - 6) / FONT_PIX_PER_LINE;
edit->num_widget_columns = (edit->widget->width - 7) / FONT_MEAN_WIDTH;
if (edit->force & (REDRAW_PAGE | REDRAW_COMPLETELY)) {
edit->force |= REDRAW_PAGE | REDRAW_COMPLETELY;
edit_render_keypress (edit);
} else {
edit_convert_expose_to_area (xexpose, &row_start, &col_start, &row_end, &col_end);
edit_render (edit, 1, row_start, col_start, row_end, col_end);
}
EditExposeRedraw = 0;
}
void edit_render_keypress (WEdit * edit)
{
edit_render (edit, 0, 0, 0, 0, 0);
}
#else
void edit_render_keypress (WEdit * edit)
{
edit_render (edit, 0, 0, 0, 0, 0);
}
#endif

456
edit/editmenu.c Normal file
View File

@ -0,0 +1,456 @@
/* editor menu definitions and initialisation
Copyright (C) 1996 the Free Software Foundation
Authors: 1996, 1997 Paul Sheer
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You 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. */
#include <config.h>
#include "edit.h"
#include "editcmddef.h"
#ifdef MIDNIGHT
#include "src/mad.h"
extern int edit_key_emulation;
extern WEdit *wedit;
extern WButtonBar *edit_bar;
extern Dlg_head *edit_dlg;
extern WMenu *edit_menubar;
#undef edit_message_dialog
#define edit_message_dialog(w,x,y,h,s) query_dialog (h, s, 0, 1, "&Ok")
#define CFocus(x)
static void menu_cmd (int i)
{
send_message (wedit->widget.parent, (Widget *) wedit, WIDGET_COMMAND, i);
}
static void menu_key (int i)
{
send_message (wedit->widget.parent, (Widget *) wedit, WIDGET_KEY, i);
}
void edit_wrap_cmd ()
{
char *f;
char s[12];
sprintf (s, "%d", option_word_wrap_line_length);
f = input_dialog (_(" Word wrap "),
/* Not essential to translate */
_(" Enter line length, 0 for off: "), s);
if (f) {
if (*f) {
option_word_wrap_line_length = atoi (f);
free (f);
}
}
}
void edit_about_cmd ()
{
edit_message_dialog (wedit->mainid, 20, 20, " About ",
"\n"
" Cooledit v2.1\n"
"\n"
" Copyright (C) 1996 the Free Software Foundation\n"
"\n"
" A user friendly text editor written\n"
" for the Midnight Commander.\n"
);
}
void menu_mail_cmd (void) { menu_cmd (CK_Mail); }
void menu_load_cmd (void) { menu_cmd (CK_Load); }
void menu_new_cmd (void) { menu_cmd (CK_New); }
void menu_save_cmd (void) { menu_cmd (CK_Save); }
void menu_save_as_cmd (void) { menu_cmd (CK_Save_As); }
void menu_insert_file_cmd (void) { menu_cmd (CK_Insert_File); }
void menu_quit_cmd (void) { menu_cmd (CK_Exit); }
void menu_mark_cmd (void) { menu_cmd (CK_Mark); }
void menu_ins_cmd (void) { menu_cmd (CK_Toggle_Insert); }
void menu_copy_cmd (void) { menu_cmd (CK_Copy); }
void menu_move_cmd (void) { menu_cmd (CK_Move); }
void menu_delete_cmd (void) { menu_cmd (CK_Remove); }
void menu_cut_cmd (void) { menu_cmd (CK_Save_Block); }
void menu_search_cmd (void) { menu_cmd (CK_Find); }
void menu_search_again_cmd (void) { menu_cmd (CK_Find_Again); }
void menu_replace_cmd (void) { menu_cmd (CK_Replace); }
void menu_begin_record_cmd (void) { menu_cmd (CK_Begin_Record_Macro); }
void menu_end_record_cmd (void) { menu_cmd (CK_End_Record_Macro); }
void menu_wrap_cmd (void) { edit_wrap_cmd (); }
void menu_exec_macro_cmd (void) { menu_key (XCTRL ('a')); }
void menu_exec_macro_delete_cmd (void) { menu_cmd (CK_Delete_Macro); }
void menu_c_form_cmd (void) { menu_key (KEY_F (19)); }
void menu_ispell_cmd (void) { menu_cmd (CK_Pipe_Block (1)); }
void menu_sort_cmd (void) { menu_cmd (CK_Sort); }
void menu_date_cmd (void) { menu_cmd (CK_Date); }
void menu_undo_cmd (void) { menu_cmd (CK_Undo); }
void menu_beginning_cmd (void) { menu_cmd (CK_Beginning_Of_Text); }
void menu_end_cmd (void) { menu_cmd (CK_End_Of_Text); }
void menu_refresh_cmd (void) { menu_cmd (CK_Refresh); }
void menu_goto_line (void) { menu_cmd (CK_Goto); }
void menu_lit_cmd (void) { menu_key (XCTRL ('q')); }
void menu_format_paragraph (void) { menu_cmd (CK_Paragraph_Format); }
void edit_options_dialog (void);
void menu_options (void) { edit_options_dialog (); }
static menu_entry FileMenu[] =
{
{' ', "Open/load... C-o", 'O', menu_load_cmd},
{' ', "New C-n", 'N', menu_new_cmd},
{' ', "", ' ', 0},
{' ', "Save F2", 'S', menu_save_cmd},
{' ', "save As... F12", 'A', menu_save_as_cmd},
{' ', "", ' ', 0},
{' ', "Insert file... F15", 'I', menu_insert_file_cmd},
{' ', "copy to File... C-f", 'F', menu_cut_cmd},
{' ', "", ' ', 0},
{' ', "aBout... ", 'B', edit_about_cmd},
{' ', "", ' ', 0},
{' ', "Quit F10", 'Q', menu_quit_cmd}
};
static menu_entry FileMenuEmacs[] =
{
{' ', "Open/load... C-o", 'O', menu_load_cmd},
{' ', "New C-x k", 'N', menu_new_cmd},
{' ', "", ' ', 0},
{' ', "Save F2", 'S', menu_save_cmd},
{' ', "save As... F12", 'A', menu_save_as_cmd},
{' ', "", ' ', 0},
{' ', "Insert file... F15", 'I', menu_insert_file_cmd},
{' ', "copy to File... ", 'F', menu_cut_cmd},
{' ', "", ' ', 0},
{' ', "aBout... ", 'B', edit_about_cmd},
{' ', "", ' ', 0},
{' ', "Quit F10", 'Q', menu_quit_cmd}
};
static menu_entry EditMenu[] =
{
{' ', "Toggle Mark F3", 'T', menu_mark_cmd},
{' ', "", ' ', 0},
{' ', "toggle Ins/overw Ins", 'I', menu_ins_cmd},
{' ', "", ' ', 0},
{' ', "Copy F5", 'C', menu_copy_cmd},
{' ', "Move F6", 'M', menu_move_cmd},
{' ', "Delete F8", 'D', menu_delete_cmd},
{' ', "", ' ', 0},
{' ', "Undo C-u", 'U', menu_undo_cmd},
{' ', "", ' ', 0},
{' ', "Beginning C-PgUp", 'B', menu_beginning_cmd},
{' ', "End C-PgDn", 'E', menu_end_cmd}
};
static menu_entry EditMenuEmacs[] =
{
{' ', "Toggle Mark F3", 'T', menu_mark_cmd},
{' ', "", ' ', 0},
{' ', "toggle Ins/overw Ins", 'I', menu_ins_cmd},
{' ', "", ' ', 0},
{' ', "Copy F5", 'C', menu_copy_cmd},
{' ', "Move F6", 'M', menu_move_cmd},
{' ', "Delete F8", 'D', menu_delete_cmd},
{' ', "", ' ', 0},
{' ', "Undo C-u", 'U', menu_undo_cmd},
{' ', "", ' ', 0},
{' ', "Beginning C-PgUp", 'B', menu_beginning_cmd},
{' ', "End C-PgDn", 'E', menu_end_cmd}
};
static menu_entry SearReplMenu[] =
{
{' ', "Search... F7", 'S', menu_search_cmd},
{' ', "search Again F17", 'A', menu_search_again_cmd},
{' ', "Replace... F4", 'R', menu_replace_cmd}
};
static menu_entry SearReplMenuEmacs[] =
{
{' ', "Search... F7", 'S', menu_search_cmd},
{' ', "search Again F17", 'A', menu_search_again_cmd},
{' ', "Replace... F4", 'R', menu_replace_cmd}
};
static menu_entry CmdMenu[] =
{
{' ', "Goto line... M-l", 'G', menu_goto_line},
{' ', "", ' ', 0},
{' ', "insert Literal... C-q", 'L', menu_lit_cmd},
{' ', "", ' ', 0},
{' ', "Refresh screen C-l", 'R', menu_refresh_cmd},
{' ', "", ' ', 0},
{' ', "Start record macro C-r", 'S', menu_begin_record_cmd},
{' ', "Finish record macro... C-r", 'F', menu_end_record_cmd},
{' ', "Execute macro... C-a, KEY", 'E', menu_exec_macro_cmd},
{' ', "Delete macro... ", 'o', menu_exec_macro_delete_cmd},
{' ', "", ' ', 0},
{' ', "insert Date/time ", 'D', menu_date_cmd},
{' ', "", ' ', 0},
{' ', "Format paragraph M-p", 'a', menu_format_paragraph},
{' ', "'ispell' Spell Check C-p", 'P', menu_ispell_cmd},
{' ', "Sort... M-t", 'O', menu_sort_cmd},
{' ', "'indent' C Formatter F19", 'C', menu_c_form_cmd},
{' ', "Mail... ", 'M', menu_mail_cmd}
};
static menu_entry CmdMenuEmacs[] =
{
{' ', "Goto line... M-l", 'G', menu_goto_line},
{' ', "", ' ', 0},
{' ', "insert Literal... C-q", 'L', menu_lit_cmd},
{' ', "", ' ', 0},
{' ', "Refresh screen C-l", 'R', menu_refresh_cmd},
{' ', "", ' ', 0},
{' ', "Start record macro C-r", 'S', menu_begin_record_cmd},
{' ', "Finish record macro... C-r", 'F', menu_end_record_cmd},
{' ', "Execute macro... C-x e, KEY", 'E', menu_exec_macro_cmd},
{' ', "Delete macro... ", 'o', menu_exec_macro_delete_cmd},
{' ', "", ' ', 0},
{' ', "insert Date/time ", 'D', menu_date_cmd},
{' ', "", ' ', 0},
{' ', "Format paragraph M-p", 'a', menu_format_paragraph},
{' ', "'ispell' Spell Check M-$", 'P', menu_ispell_cmd},
{' ', "Sort... M-t", 'T', menu_sort_cmd},
{' ', "'indent' C Formatter F19", 'C', menu_c_form_cmd}
};
extern void menu_save_mode_cmd (void);
static menu_entry OptMenu[] =
{
{' ', "General... ", 'G', menu_options},
{' ', "Save mode...", 'S', menu_save_mode_cmd}
#if 0
{' ', "Layout...", 'L', menu_layout_cmd}
#endif
};
static menu_entry OptMenuEmacs[] =
{
{' ', "General... ", 'G', menu_options},
{' ', "Save mode...", 'S', menu_save_mode_cmd}
#if 0
{' ', "Layout...", 'L', menu_layout_cmd}
#endif
};
#define menu_entries(x) sizeof(x)/sizeof(menu_entry)
Menu EditMenuBar[N_menus];
void edit_init_menu_normal (void)
{
EditMenuBar[0] = create_menu (" File ", FileMenu, menu_entries (FileMenu));
EditMenuBar[1] = create_menu (" Edit ", EditMenu, menu_entries (EditMenu));
EditMenuBar[2] = create_menu (" Sear/Repl ", SearReplMenu, menu_entries (SearReplMenu));
EditMenuBar[3] = create_menu (" Command ", CmdMenu, menu_entries (CmdMenu));
EditMenuBar[4] = create_menu (" Options ", OptMenu, menu_entries (OptMenu));
}
void edit_init_menu_emacs (void)
{
EditMenuBar[0] = create_menu (" File ", FileMenuEmacs, menu_entries (FileMenuEmacs));
EditMenuBar[1] = create_menu (" Edit ", EditMenuEmacs, menu_entries (EditMenuEmacs));
EditMenuBar[2] = create_menu (" Sear/Repl ", SearReplMenuEmacs, menu_entries (SearReplMenuEmacs));
EditMenuBar[3] = create_menu (" Command ", CmdMenuEmacs, menu_entries (CmdMenuEmacs));
EditMenuBar[4] = create_menu (" Options ", OptMenuEmacs, menu_entries (OptMenuEmacs));
}
void edit_done_menu (void)
{
int i;
for (i = 0; i < N_menus; i++)
destroy_menu (EditMenuBar[i]);
}
void edit_drop_menu_cmd (WEdit * e, int which)
{
if (edit_menubar->active)
return;
edit_menubar->active = 1;
edit_menubar->dropped = drop_menus;
edit_menubar->previous_selection = which >= 0 ? which : dlg_item_number (edit_dlg);
if (which >= 0)
edit_menubar->selected = which;
dlg_select_widget (edit_dlg, edit_menubar);
}
void edit_menu_cmd (WEdit * e)
{
edit_drop_menu_cmd (e, -1);
}
int edit_drop_hotkey_menu (WEdit * e, int key)
{
int m = 0;
switch (key) {
case ALT ('f'):
if (edit_key_emulation == EDIT_KEY_EMULATION_EMACS)
return 0;
m = 0;
break;
case ALT ('e'):
m = 1;
break;
case ALT ('s'):
m = 2;
break;
case ALT ('c'):
m = 3;
break;
case ALT ('o'):
m = 4;
break;
default:
return 0;
}
edit_drop_menu_cmd (e, m);
return 1;
}
#else /* !MIDNIGHT */
extern CWidget *wedit;
void CSetEditMenu (const char *ident)
{
wedit = CIdent (ident);
}
CWidget *CGetEditMenu (void)
{
return wedit;
}
static void menu_cmd (unsigned long i)
{
XEvent e;
if (wedit) {
memset (&e, 0, sizeof (XEvent));
e.type = EditorCommand;
e.xkey.keycode = i;
e.xkey.window = wedit->winid;
CFocus (wedit);
CSendEvent (&e);
}
}
void CEditMenuCommand (int i)
{
menu_cmd ((unsigned long) i);
}
static void menu_key (KeySym i, int state)
{
int cmd, ch;
if (edit_translate_key (0, i, state, &cmd, &ch)) {
if (cmd > 0)
menu_cmd (cmd);
}
}
static void menu_ctrl_key (unsigned long i)
{
menu_key ((KeySym) i, ControlMask);
}
void CDrawEditMenuButtons (const char *ident, Window parent, Window focus_return, int x, int y)
{
int d;
CDrawMenuButton (catstrs (ident, ".filemenu", 0), parent, focus_return, x, y, AUTO_WIDTH, AUTO_HEIGHT, 8,
/* The following are menu options. Do not change the key bindings (eg. C-o) and preserve '\t' */
_(" File "),
_("Open...\tC-o"), '~', menu_cmd, CK_Load,
_("New\tC-n"), '~', menu_cmd, CK_New,
"", ' ', 0, 0,
_("Save\tF2"), '~', menu_cmd, CK_Save,
_("Save as...\tF12"), '~', menu_cmd, CK_Save_As,
"", ' ', 0, 0,
_("Insert file...\tF15"), '~', menu_cmd, CK_Insert_File,
_("Copy to file...\tC-f"), '~', menu_cmd, CK_Save_Block
);
/* Tool hint */
CSetToolHint (catstrs (ident, ".filemenu", 0), _("Disk operations"));
CGetHintPos (&x, &d);
CDrawMenuButton (catstrs (ident, ".editmenu", 0), parent, focus_return, x, y, AUTO_WIDTH, AUTO_HEIGHT, 14,
_(" Edit "),
_("Toggle mark\tF3"), '~', menu_cmd, CK_Mark,
"", ' ', 0, 0,
_("Toggle insert/overwrite\tIns"), '~', menu_cmd, CK_Toggle_Insert,
"", ' ', 0, 0,
_("Copy block to cursor\tF5"), '~', menu_cmd, CK_Copy,
_("Move block to cursor\tF6"), '~', menu_cmd, CK_Move,
_("Delete block\tF8/C-Del"), '~', menu_cmd, CK_Remove,
"", ' ', 0, 0,
_("Copy block to clipbrd\tC-Ins"), '~', menu_cmd, CK_XStore,
_("Cut block to clipbrd\tS-Del"), '~', menu_cmd, CK_XCut,
_("Paste block from clipbrd\tS-Ins"), '~', menu_cmd, CK_XPaste,
_("Selection history\tM-Ins"), '~', menu_cmd, CK_Selection_History,
"", ' ', 0, 0,
_("Undo\tC-BackSpace"), '~', menu_cmd, CK_Undo
);
/* Tool hint */
CSetToolHint (catstrs (ident, ".editmenu", 0), _("Manipulating blocks of text"));
CGetHintPos (&x, &d);
CDrawMenuButton (catstrs (ident, ".searchmenu", 0), parent, focus_return, x, y, AUTO_WIDTH, AUTO_HEIGHT, 4,
_(" Srch/Replce "),
_("Search...\tF7"), '~', menu_cmd, CK_Find,
_("Search again\tF17"), '~', menu_cmd, CK_Find_Again,
_("Replace...\tF4"), '~', menu_cmd, CK_Replace,
_("Replace again\tF14"), '~', menu_cmd, CK_Replace_Again
);
/* Tool hint */
CSetToolHint (catstrs (ident, ".searchmenu", 0), _("Search for and replace text"));
CGetHintPos (&x, &d);
CDrawMenuButton (catstrs (ident, ".commandmenu", 0), parent, focus_return, x, y, AUTO_WIDTH, AUTO_HEIGHT, 9,
_(" Command "),
_("Goto line...\tM-l"), '~', menu_cmd, CK_Goto,
"", ' ', 0, 0,
_("Start record macro\tC-r"), '~', menu_cmd, CK_Begin_Record_Macro,
_("Finish record macro...\tC-r"), '~', menu_cmd, CK_End_Record_Macro,
_("Execute macro...\tC-a, KEY"), '~', menu_ctrl_key, XK_a,
_("Delete macro...\t"), '~', menu_cmd, CK_Delete_Macro,
"", ' ', 0, 0,
_("Insert date/time\tC-d"), '~', menu_cmd, CK_Date,
_("Format paragraph\tM-p"), '~', menu_cmd, CK_Paragraph_Format
);
/* Tool hint */
CSetToolHint (catstrs (ident, ".commandmenu", 0), _("Macros and internal commands"));
}
#endif /* !MIDNIGHT */

169
edit/editoptions.c Normal file
View File

@ -0,0 +1,169 @@
/* editor options dialog box
Copyright (C) 1996, 1997 the Free Software Foundation
Authors: 1996, 1997 Paul Sheer
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You 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. */
#include <config.h>
#include "edit.h"
#define OPT_DLG_H 13
#define OPT_DLG_W 72
#ifndef USE_INTERNAL_EDIT
#define USE_INTERNAL_EDIT 1
#endif
#include "src/main.h" /* extern int option_this_and_that ... */
char *key_emu_str[] =
{"Intuitive", "Emacs"};
char *wrap_str[] =
{_("None"), _("Dynamic paragraphing"), _("Type writer wrap")};
void edit_options_dialog (void)
{
char wrap_length[32], tab_spacing[32], *p, *q;
int wrap_mode = 0;
int tedit_key_emulation = edit_key_emulation;
int toption_fill_tabs_with_spaces = option_fill_tabs_with_spaces;
int tedit_confirm_save = edit_confirm_save;
int toption_return_does_auto_indent = option_return_does_auto_indent;
int toption_backspace_through_tabs = option_backspace_through_tabs;
int toption_fake_half_tabs = option_fake_half_tabs;
QuickWidget quick_widgets[] =
{
/*0 */
{quick_button, 6, 10, OPT_DLG_H - 3, OPT_DLG_H, "&Cancel", 0, B_CANCEL, 0,
0, XV_WLAY_DONTCARE, NULL},
/*1 */
{quick_button, 2, 10, OPT_DLG_H - 3, OPT_DLG_H, "&Ok", 0, B_ENTER, 0,
0, XV_WLAY_DONTCARE, NULL},
/*2 */
{quick_label, OPT_DLG_W / 2, OPT_DLG_W, OPT_DLG_H - 4, OPT_DLG_H, "Word wrap line length : ", 0, 0,
0, 0, XV_WLAY_DONTCARE, NULL},
/*3 */
{quick_input, OPT_DLG_W / 2 + 24, OPT_DLG_W, OPT_DLG_H - 4, OPT_DLG_H, "", OPT_DLG_W / 2 - 4 - 24, 0,
0, 0, XV_WLAY_DONTCARE, "i"},
/*4 */
{quick_label, OPT_DLG_W / 2, OPT_DLG_W, OPT_DLG_H - 5, OPT_DLG_H, "Tab spacing : ", 0, 0,
0, 0, XV_WLAY_DONTCARE, NULL},
/*5 */
{quick_input, OPT_DLG_W / 2 + 24, OPT_DLG_W, OPT_DLG_H - 5, OPT_DLG_H, "", OPT_DLG_W / 2 - 4 - 24, 0,
0, 0, XV_WLAY_DONTCARE, "i"},
/*6 */
{quick_checkbox, OPT_DLG_W / 2 + 1, OPT_DLG_W, OPT_DLG_H - 7, OPT_DLG_H, "confir&M before saving", 6, 0,
0, 0, XV_WLAY_DONTCARE, NULL},
/*7 */
{quick_checkbox, OPT_DLG_W / 2 + 1, OPT_DLG_W, OPT_DLG_H - 8, OPT_DLG_H, "&Fill tabs with spaces", 0, 0,
0, 0, XV_WLAY_DONTCARE, NULL},
/*8 */
{quick_checkbox, OPT_DLG_W / 2 + 1, OPT_DLG_W, OPT_DLG_H - 9, OPT_DLG_H, "&Return does auto indent", 0, 0,
0, 0, XV_WLAY_DONTCARE, NULL},
/*9 */
{quick_checkbox, OPT_DLG_W / 2 + 1, OPT_DLG_W, OPT_DLG_H - 10, OPT_DLG_H, "&Backspace through tabs", 0, 0,
0, 0, XV_WLAY_DONTCARE, NULL},
/*10 */
{quick_checkbox, OPT_DLG_W / 2 + 1, OPT_DLG_W, OPT_DLG_H - 11, OPT_DLG_H, "&Fake half tabs", 0, 0,
0, 0, XV_WLAY_DONTCARE, NULL},
/*11 */
{quick_radio, 5, OPT_DLG_W, OPT_DLG_H - 6, OPT_DLG_H, "", 3, 0,
0, wrap_str, XV_WLAY_DONTCARE, "wrapm"},
/*12 */
{quick_label, 4, OPT_DLG_W, OPT_DLG_H - 7, OPT_DLG_H, _("Wrap mode"), 0, 0,
0, 0, XV_WLAY_DONTCARE, NULL},
/*13 */
{quick_radio, 5, OPT_DLG_W, OPT_DLG_H - 10, OPT_DLG_H, "", 2, 0,
0, key_emu_str, XV_WLAY_DONTCARE, "keyemu"},
/*14 */
{quick_label, 4, OPT_DLG_W, OPT_DLG_H - 11, OPT_DLG_H, _("Key emulation"), 0, 0,
0, 0, XV_WLAY_DONTCARE, NULL},
{0}};
sprintf (wrap_length, "%d", option_word_wrap_line_length);
sprintf (tab_spacing, "%d", option_tab_spacing);
quick_widgets[3].text = wrap_length;
quick_widgets[3].str_result = &p;
quick_widgets[5].text = tab_spacing;
quick_widgets[5].str_result = &q;
quick_widgets[6].result = &tedit_confirm_save;
quick_widgets[7].result = &toption_fill_tabs_with_spaces;
quick_widgets[8].result = &toption_return_does_auto_indent;
quick_widgets[9].result = &toption_backspace_through_tabs;
quick_widgets[10].result = &toption_fake_half_tabs;
if (option_auto_para_formatting)
wrap_mode = 1;
else if (option_typewriter_wrap)
wrap_mode = 2;
else
wrap_mode = 0;
quick_widgets[11].result = &wrap_mode;
quick_widgets[11].value = wrap_mode;
quick_widgets[13].result = &tedit_key_emulation;
quick_widgets[13].value = tedit_key_emulation;
{
QuickDialog Quick_options =
{OPT_DLG_W, OPT_DLG_H, -1, 0, " Editor Options ",
"", "quick_input", 0};
Quick_options.widgets = quick_widgets;
if (quick_dialog (&Quick_options) != B_CANCEL) {
if (p) {
option_word_wrap_line_length = atoi (p);
free (p);
}
if (q) {
option_tab_spacing = atoi (q);
if (option_tab_spacing < 0)
option_tab_spacing = 2;
option_tab_spacing += option_tab_spacing & 1;
free (q);
}
edit_confirm_save = *quick_widgets[6].result;
option_fill_tabs_with_spaces = *quick_widgets[7].result;
option_return_does_auto_indent = *quick_widgets[8].result;
option_backspace_through_tabs = *quick_widgets[9].result;
option_fake_half_tabs = *quick_widgets[10].result;
if (*quick_widgets[11].result == 1) {
option_auto_para_formatting = 1;
option_typewriter_wrap = 0;
} else if (*quick_widgets[11].result == 2) {
option_auto_para_formatting = 0;
option_typewriter_wrap = 1;
} else {
option_auto_para_formatting = 0;
option_typewriter_wrap = 0;
}
edit_key_emulation = *quick_widgets[13].result;
return;
} else {
return;
}
}
}

999
edit/editwidget.c Normal file
View File

@ -0,0 +1,999 @@
/* editor initialisation and callback handler.
Copyright (C) 1996, 1997 the Free Software Foundation
Authors: 1996, 1997 Paul Sheer
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You 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. */
#include <config.h>
#include "edit.h"
#ifndef MIDNIGHT
#include <X11/Xmd.h> /* CARD32 */
#include <X11/Xatom.h>
#include "app_glob.c"
#include "coollocal.h"
#include "editcmddef.h"
#include "mousemark.h"
#endif
#ifdef __os2__
# include <direct.h>
#endif
#ifndef MIDNIGHT
extern int EditExposeRedraw;
CWidget *wedit = 0;
void edit_destroy_callback (CWidget * w)
{
if (w) {
edit_clean (w->editor);
if (w->editor)
free (w->editor);
w->editor = NULL;
} else
/* NLS ? */
CError ("Trying to destroy non-existing editor widget.\n");
}
extern int option_editor_bg_normal;
void edit_tri_cursor (Window win);
/* starting_directory is for the filebrowser */
CWidget *CDrawEditor (const char *identifier, Window parent, int x, int y,
int width, int height, const char *text, const char *filename,
const char *starting_directory, unsigned int options, unsigned long text_size)
{
static made_directory = 0;
CWidget *w;
WEdit *e;
wedit = w = CSetupWidget (identifier, parent, x, y,
width + 7, height + 6, C_EDITOR_WIDGET,
ExposureMask | ButtonPressMask | ButtonReleaseMask | \
KeyPressMask | KeyReleaseMask | ButtonMotionMask | \
PropertyChangeMask | StructureNotifyMask | \
EnterWindowMask | LeaveWindowMask, color_palette (option_editor_bg_normal), 1);
edit_tri_cursor (w->winid);
w->options = options | WIDGET_TAKES_SELECTION;
w->destroy = edit_destroy_callback;
if (filename)
w->label = strdup (filename);
else
w->label = strdup ("");
if (!made_directory) {
mkdir (catstrs (home_dir, EDIT_DIR, 0), 0700);
made_directory = 1;
}
e = w->editor = CMalloc (sizeof (WEdit));
if (!w->editor) {
/* Not essential to translate */
CError (_ ("Error initialising editor.\n"));
return 0;
}
w->editor->widget = w;
e = w->editor = edit_init (e, height / FONT_PIX_PER_LINE, width / FONT_MEAN_WIDTH, filename, text, starting_directory, text_size);
if (!e) {
CDestroyWidget (w->ident);
return 0;
}
e->macro_i = -1;
e->widget = w;
set_hint_pos (x + width + 7 + WIDGET_SPACING, y + height + 6 + WIDGET_SPACING);
if (!(options & EDITOR_NO_TEXT))
CDrawText (catstrs (identifier, ".text", 0), parent, x, y + height + 6 + WIDGET_SPACING, "%s", e->filename);
if (!(options & EDITOR_NO_SCROLL)) {
w->vert_scrollbar = CDrawVerticalScrollbar (catstrs (identifier, ".vsc", 0), parent,
x + width + 7 + WIDGET_SPACING, y, height + 6, 20, 0, 0);
CSetScrollbarCallback (w->vert_scrollbar->ident, w->ident, link_scrollbar_to_editor);
}
return w;
}
void update_scroll_bar (WEdit * e)
{
int i, x1, x2;
CWidget *scroll;
scroll = e->widget->vert_scrollbar;
if (!scroll)
return;
i = e->total_lines - e->start_line + 1;
if (i > e->num_widget_lines)
i = e->num_widget_lines;
if (e->total_lines) {
x1 = (double) 65535.0 *e->start_line / (e->total_lines + 1);
x2 = (double) 65535.0 *i / (e->total_lines + 1);
} else {
x1 = 0;
x2 = 65535;
}
if (x1 != scroll->firstline || x2 != scroll->numlines) {
scroll->firstline = x1;
scroll->numlines = x2;
EditExposeRedraw = 1;
render_scrollbar (scroll);
EditExposeRedraw = 0;
}
}
/* returns the position in the edit buffer of a window click */
long edit_get_click_pos (WEdit * edit, int x, int y)
{
long click;
/* (1) goto to left margin */
click = edit_bol (edit, edit->curs1);
/* (1) move up or down */
if (y > (edit->curs_row + 1))
click = edit_move_forward (edit, click, y - (edit->curs_row + 1), 0);
if (y < (edit->curs_row + 1))
click = edit_move_backward (edit, click, (edit->curs_row + 1) - y);
/* (3) move right to x pos */
click = edit_move_forward3 (edit, click, x - edit->start_col - 1, 0);
return click;
}
void edit_translate_xy (int xs, int ys, int *x, int *y)
{
*x = xs - EDIT_TEXT_HORIZONTAL_OFFSET;
*y = (ys - EDIT_TEXT_VERTICAL_OFFSET - option_text_line_spacing / 2 - 1) / FONT_PIX_PER_LINE + 1;
}
extern int just_dropped_something;
static void mouse_redraw (WEdit * edit, long click)
{
edit->force |= REDRAW_PAGE | REDRAW_LINE;
edit_update_curs_row (edit);
edit_update_curs_col (edit);
edit->prev_col = edit_get_col (edit);
edit_update_screen (edit);
edit->search_start = click;
}
static void xy (int x, int y, int *x_return, int *y_return)
{
edit_translate_xy (x, y, x_return, y_return);
}
static long cp (WEdit *edit, int x, int y)
{
return edit_get_click_pos (edit, x, y);
}
/* return 1 if not marked */
static int marks (WEdit * edit, long *start, long *end)
{
return eval_marks (edit, start, end);
}
int column_highlighting = 0;
static int erange (WEdit * edit, long start, long end, int click)
{
if (column_highlighting) {
int x;
x = edit_move_forward3 (edit, edit_bol (edit, click), 0, click);
if ((x >= edit->column1 && x < edit->column2)
|| (x > edit->column2 && x <= edit->column1))
return (start <= click && click < end);
else
return 0;
}
return (start <= click && click < end);
}
static void fin_mark (WEdit *edit)
{
if (edit->mark2 < 0)
edit_mark_cmd (edit, 0);
}
static void move_mark (WEdit *edit)
{
edit_mark_cmd (edit, 1);
edit_mark_cmd (edit, 0);
}
static void release_mark (WEdit *edit, XEvent *event)
{
if (edit->mark2 < 0)
edit_mark_cmd (edit, 0);
else
edit_mark_cmd (edit, 1);
if (edit->mark1 != edit->mark2) {
edit_get_selection (edit);
XSetSelectionOwner (CDisplay, XA_PRIMARY, edit->widget->winid, event->xbutton.time);
}
}
static char *get_block (WEdit * edit, long start_mark, long end_mark, int *type, int *l)
{
char *t;
t = (char *) edit_get_block (edit, start_mark, end_mark, l);
if (strlen (t) < *l)
*type = DndRawData; /* if there are nulls in the data, send as raw */
else
*type = DndText; /* else send as text */
return t;
}
static void move (WEdit *edit, long click, int y)
{
edit_cursor_move (edit, click - edit->curs1);
}
static void dclick (WEdit *edit, XEvent *event)
{
edit_mark_cmd (edit, 1);
edit_right_word_move (edit);
edit_mark_cmd (edit, 0);
edit_left_word_move (edit);
release_mark (edit, event);
}
static void redraw (WEdit *edit, long click)
{
mouse_redraw (edit, click);
}
static void edit_mouse_mark (WEdit * edit, XEvent * event, CEvent * ce)
{
edit_update_curs_row (edit);
edit_update_curs_col (edit);
if (event->type != MotionNotify) {
edit_push_action (edit, KEY_PRESS + edit->start_display);
if (edit->mark2 == -1)
edit_push_action (edit, MARK_1 + edit->mark1); /* mark1 must be following the cursor */
}
if (event->type == ButtonPress) {
edit->highlight = 0;
edit->found_len = 0;
}
mouse_mark (
(void *) edit,
event,
ce,
(void (*) (int, int, int *, int *)) xy,
(long (*) (void *, int, int)) cp,
(int (*) (void *, long *, long *)) marks,
(int (*) (void *, long, long, long)) erange,
(void (*) (void *)) fin_mark,
(void (*) (void *)) move_mark,
(void (*) (void *, XEvent *)) release_mark,
(char * (*) (void *, long, long, int *, int *)) get_block,
(void (*) (void *, long, int)) move,
0,
(void (*) (void *, XEvent *)) dclick,
(void (*) (void *, long)) redraw
);
}
void link_scrollbar_to_editor (CWidget * scrollbar, CWidget * editor, XEvent * xevent, CEvent * cwevent, int whichscrbutton)
{
int i, start_line;
WEdit *e;
e = editor->editor;
if (!e)
return;
if (!e->widget->vert_scrollbar)
return;
start_line = e->start_line;
if ((xevent->type == ButtonRelease || xevent->type == MotionNotify) && whichscrbutton == 3) {
edit_move_display (e, (double) scrollbar->firstline * e->total_lines / 65535.0 + 1);
} else if (xevent->type == ButtonPress && (cwevent->button == Button1 || cwevent->button == Button2)) {
switch (whichscrbutton) {
case 1:
edit_move_display (e, e->start_line - e->num_widget_lines + 1);
break;
case 2:
edit_move_display (e, e->start_line - 1);
break;
case 5:
edit_move_display (e, e->start_line + 1);
break;
case 4:
edit_move_display (e, e->start_line + e->num_widget_lines - 1);
break;
}
}
if (e->total_lines)
scrollbar->firstline = (double) 65535.0 *e->start_line / (e->total_lines + 1);
else
scrollbar->firstline = 0;
i = e->total_lines - e->start_line + 1;
if (i > e->num_widget_lines)
i = e->num_widget_lines;
if (e->total_lines)
scrollbar->numlines = (double) 65535.0 *i / (e->total_lines + 1);
else
scrollbar->numlines = 65535;
if (start_line != e->start_line) {
e->force |= REDRAW_PAGE | REDRAW_LINE;
set_cursor_position (0, 0, 0, 0, 0, 0, 0, 0, 0);
if (CCheckWindowEvent (xevent->xany.window, ButtonReleaseMask | ButtonMotionMask, 0))
return;
}
if (e->force) {
edit_render_keypress (e);
edit_status (e);
}
}
/*
This section comes from rxvt-2.21b1/src/screen.c by
Robert Nation <nation@rocket.sanders.lockheed.com> &
mods by mj olesen <olesen@me.QueensU.CA>
Changes made for cooledit
*/
void selection_send (XSelectionRequestEvent * rq)
{
XEvent ev;
static Atom xa_targets = None;
if (xa_targets == None)
xa_targets = XInternAtom (CDisplay, "TARGETS", False);
ev.xselection.type = SelectionNotify;
ev.xselection.property = None;
ev.xselection.display = rq->display;
ev.xselection.requestor = rq->requestor;
ev.xselection.selection = rq->selection;
ev.xselection.target = rq->target;
ev.xselection.time = rq->time;
if (rq->target == xa_targets) {
/*
* On some systems, the Atom typedef is 64 bits wide.
* We need to have a typedef that is exactly 32 bits wide,
* because a format of 64 is not allowed by the X11 protocol.
*/
typedef CARD32 Atom32;
Atom32 target_list[2];
target_list[0] = (Atom32) xa_targets;
target_list[1] = (Atom32) XA_STRING;
XChangeProperty (CDisplay, rq->requestor, rq->property,
xa_targets, 8 * sizeof (target_list[0]), PropModeReplace,
(unsigned char *) target_list,
sizeof (target_list) / sizeof (target_list[0]));
ev.xselection.property = rq->property;
} else if (rq->target == XA_STRING) {
XChangeProperty (CDisplay, rq->requestor, rq->property,
XA_STRING, 8, PropModeReplace,
selection.text, selection.len);
ev.xselection.property = rq->property;
}
XSendEvent (CDisplay, rq->requestor, False, 0, &ev);
}
/*{{{ paste selection */
/*
* Respond to a notification that a primary selection has been sent
*/
void paste_prop (void *data, void (*insert) (void *, int), Window win, unsigned prop, int delete)
{
long nread;
unsigned long bytes_after;
if (prop == None)
return;
nread = 0;
do {
unsigned char *s;
Atom actual_type;
int actual_fmt, i;
unsigned long nitems;
if (XGetWindowProperty (CDisplay, win, prop,
nread / 4, 65536, delete,
AnyPropertyType, &actual_type, &actual_fmt,
&nitems, &bytes_after,
&s) != Success) {
XFree (s);
return;
}
nread += nitems;
for (i = 0; i < nitems; i++)
(*insert) (data, s[i]);
XFree (s);
} while (bytes_after);
}
void selection_paste (WEdit * edit, Window win, unsigned prop, int delete)
{
long c;
c = edit->curs1;
paste_prop ((void *) edit,
(void (*)(void *, int)) edit_insert,
win, prop, delete);
edit_cursor_move (edit, c - edit->curs1);
edit->force |= REDRAW_COMPLETELY | REDRAW_LINE;
}
/*}}} */
void selection_clear (void)
{
selection.text = 0;
selection.len = 0;
}
void edit_update_screen (WEdit * e)
{
if (!e)
return;
if (!e->force)
return;
edit_scroll_screen_over_cursor (e);
edit_update_curs_row (e);
edit_update_curs_col (e);
update_scroll_bar (e);
edit_status (e);
if (e->force & REDRAW_COMPLETELY)
e->force |= REDRAW_PAGE;
/* pop all events for this window for internal handling */
if (e->force & (REDRAW_CHAR_ONLY | REDRAW_COMPLETELY)) {
edit_render_keypress (e);
} else if (CCheckWindowEvent (e->widget->winid, ButtonPressMask | ButtonReleaseMask | ButtonMotionMask, 0)
|| CKeyPending ()) {
e->force |= REDRAW_PAGE;
return;
} else {
edit_render_keypress (e);
}
}
extern int space_width;
static void edit_insert_column_of_text (WEdit * edit, unsigned char *data, int size, int width)
{
long cursor;
int i, col;
cursor = edit->curs1;
col = edit_get_col (edit);
for (i = 0; i < size; i++) {
if (data[i] == '\n') { /* fill in and move to next line */
int l;
long p;
if (edit_get_byte (edit, edit->curs1) != '\n') {
l = width - (edit_get_col (edit) - col);
while (l > 0) {
edit_insert (edit, ' ');
l -= space_width;
}
}
for (p = edit->curs1;; p++) {
if (p == edit->last_byte)
goto insert;
if (edit_get_byte (edit, p) == '\n') {
p++;
break;
}
}
edit_cursor_move (edit, edit_move_forward3 (edit, p, col, 0) - edit->curs1);
l = col - edit_get_col (edit);
while (l >= space_width) {
edit_insert (edit, ' ');
l -= space_width;
}
continue;
}
insert:
edit_insert (edit, data[i]);
}
edit_cursor_move (edit, cursor - edit->curs1);
}
#define free_data if (data) {free(data);data=0;}
/* handles drag and drop */
void handle_client_message (CWidget * w, XEvent * xevent, CEvent * cwevent)
{
int data_type;
unsigned char *data;
unsigned long size;
int xs, ys;
int x, y, r, deleted = 0;
long click;
unsigned int state;
long start_mark = 0, end_mark = 0;
WEdit *e = w->editor;
/* see just below for a comment on what this is for: */
if (CIsDropAcknowledge (xevent, &state) != DndNotDnd) {
if (!(state & Button1Mask) && just_dropped_something) {
edit_push_action (e, KEY_PRESS + e->start_display);
edit_block_delete_cmd (e);
}
return;
}
data_type = CGetDrop (xevent, &data, &size, &xs, &ys);
if (data_type == DndNotDnd || xs < 0 || ys < 0 || xs >= w->width || ys >= w->height) {
free_data;
return;
}
edit_translate_xy (xs, ys, &x, &y);
click = edit_get_click_pos (e, x, y);
r = eval_marks (e, &start_mark, &end_mark);
/* musn't be able to drop into a block, otherwise a single click will copy a block: */
if (r)
goto fine;
if (start_mark > click || click >= end_mark)
goto fine;
if (column_highlighting) {
if (!((x >= e->column1 && x < e->column2)
|| (x > e->column2 && x <= e->column1)))
goto fine;
}
free_data;
return;
fine:
edit_push_action (e, KEY_PRESS + e->start_display);
/* drops to the same window moving to the left: */
if (xevent->xclient.data.l[2] == xevent->xclient.window && !(xevent->xclient.data.l[1] & Button1Mask))
if ((column_highlighting && x < max (e->column1, e->column2)) || !column_highlighting) {
edit_block_delete_cmd (e);
deleted = 1;
}
edit_update_curs_row (e);
click = edit_get_click_pos (e, x, y); /* click pos changes with edit_block_delete_cmd() */
edit_cursor_move (e, click - e->curs1);
if (data_type == DndFile) {
edit_insert_file (e, (char *) data);
} else if (data_type != DndFiles) {
if (dnd_null_term_type (data_type)) {
int len;
len = strlen ((char *) data);
size = min (len, size);
}
if (column_highlighting) {
edit_insert_column_of_text (e, data, size, abs (e->column2 - e->column1));
} else {
while (size--)
edit_insert_ahead (e, data[size]);
}
} else {
while (size--)
edit_insert_ahead (e, data[size] ? data[size] : '\n');
}
/* drops to the same window moving to the right: */
if (xevent->xclient.data.l[2] == xevent->xclient.window && !(xevent->xclient.data.l[1] & Button1Mask))
if (column_highlighting && !deleted)
edit_block_delete_cmd (e);
/* The drop has now been successfully recieved. We can now send an acknowledge
event back to the window that send the data. When this window recieves
the acknowledge event, the app can decide whether or not to delete the data.
This allows text to be safely moved betweem text windows without the
risk of data being lost. In our case, drag with button1 is a copy
drag, while drag with any other button is a move drag (i.e. the sending
application must delete its selection after recieving an acknowledge
event). We must not, however, send an acknowledge signal if a filelist
(for example) was passed to us, since the sender might take this to
mean that all those files can be deleted! The two types we can acknowledge
are: */
if (xevent->xclient.data.l[2] != xevent->xclient.window) /* drops to the same window */
if (data_type == DndText || data_type == DndRawData)
CDropAcknowledge (xevent);
e->force |= REDRAW_COMPLETELY | REDRAW_LINE;
free_data;
}
int eh_editor (CWidget * w, XEvent * xevent, CEvent * cwevent)
{
WEdit *e = w->editor;
int r = 0;
static int old_tab_spacing = -1;
if (!e)
return 0;
if (old_tab_spacing != option_tab_spacing)
e->force |= REDRAW_COMPLETELY + REDRAW_LINE;
old_tab_spacing = option_tab_spacing;
if (xevent->type == KeyPress) {
if (xevent->xkey.keycode == 0x31 && xevent->xkey.state == 0xD) {
CSetColor (color_palette (18));
CRectangle (w->winid, 0, 0, w->width, w->height);
}
}
switch (xevent->type) {
case SelectionNotify:
selection_paste (e, xevent->xselection.requestor, xevent->xselection.property, True);
r = 1;
break;
case SelectionRequest:
selection_send (&(xevent->xselectionrequest));
return 1;
/* case SelectionClear: ---> This is handled by coolnext.c: CNextEvent() */
case ClientMessage:
handle_client_message (w, xevent, cwevent);
r = 1;
break;
case ButtonPress:
CFocus (w);
edit_render_tidbits (w);
case ButtonRelease:
if (xevent->xbutton.state & ControlMask)
column_highlighting = 1;
else
column_highlighting = 0;
case MotionNotify:
if (!xevent->xmotion.state && xevent->type == MotionNotify)
return 0;
resolve_button (xevent, cwevent);
edit_mouse_mark (e, xevent, cwevent);
break;
case Expose:
edit_render_expose (e, &(xevent->xexpose));
return 1;
case FocusIn:
CSetCursorColor (e->overwrite ? color_palette (24) : color_palette (19));
case FocusOut:
edit_render_tidbits (w);
e->force |= REDRAW_CHAR_ONLY | REDRAW_LINE;
break;
case KeyRelease:
if (column_highlighting) {
column_highlighting = 0;
e->force = REDRAW_COMPLETELY | REDRAW_LINE;
edit_mark_cmd (e, 1);
}
break;
case KeyPress:
cwevent->ident = w->ident;
if (!cwevent->command && cwevent->insert < 0) { /* no translation */
if ((cwevent->key == XK_r || cwevent->key == XK_R) && (cwevent->state & ControlMask)) {
cwevent->command = e->macro_i < 0 ? CK_Begin_Record_Macro : CK_End_Record_Macro;
} else {
cwevent->command = CKeySymMod (xevent);
if (cwevent->command > 0)
cwevent->command = CK_Macro (cwevent->command);
else
break;
}
}
r = edit_execute_key_command (e, cwevent->command, cwevent->insert);
break;
case EditorCommand:
cwevent->ident = w->ident;
cwevent->command = xevent->xkey.keycode;
r = cwevent->handled = edit_execute_key_command (e, xevent->xkey.keycode, -1);
break;
default:
return 0;
}
edit_update_screen (e);
return r;
}
#else
WEdit *wedit;
WButtonBar *edit_bar;
Dlg_head *edit_dlg;
WMenu *edit_menubar;
int column_highlighting = 0;
static int edit_callback (Dlg_head * h, WEdit * edit, int msg, int par);
static int edit_mode_callback (struct Dlg_head *h, int id, int msg)
{
return 0;
}
int edit_event (WEdit * edit, Gpm_Event * event, int *result)
{
*result = MOU_NORMAL;
edit_update_curs_row (edit);
edit_update_curs_col (edit);
if (event->type & (GPM_DOWN | GPM_DRAG | GPM_UP)) {
if (event->y > 1 && event->x > 0
&& event->x <= edit->num_widget_columns
&& event->y <= edit->num_widget_lines + 1) {
if (edit->mark2 != -1 && event->type & (GPM_UP | GPM_DRAG))
return 1; /* a lone up mustn't do anything */
if (event->type & (GPM_DOWN | GPM_UP))
edit_push_key_press (edit);
edit_cursor_move (edit, edit_bol (edit, edit->curs1) - edit->curs1);
if (--event->y > (edit->curs_row + 1))
edit_cursor_move (edit,
edit_move_forward (edit, edit->curs1, event->y - (edit->curs_row + 1), 0)
- edit->curs1);
if (event->y < (edit->curs_row + 1))
edit_cursor_move (edit,
+edit_move_backward (edit, edit->curs1, (edit->curs_row + 1) - event->y)
- edit->curs1);
edit_cursor_move (edit, (int) edit_move_forward3 (edit, edit->curs1,
event->x - edit->start_col - 1, 0) - edit->curs1);
edit->prev_col = edit_get_col (edit);
if (event->type & GPM_DOWN) {
edit_mark_cmd (edit, 1); /* reset */
edit->highlight = 0;
}
if (!(event->type & GPM_DRAG))
edit_mark_cmd (edit, 0);
edit->force |= REDRAW_COMPLETELY;
edit_update_curs_row (edit);
edit_update_curs_col (edit);
edit_update_screen (edit);
return 1;
}
}
return 0;
}
int menubar_event (Gpm_Event * event, WMenu * menubar); /* menu.c */
int edit_mouse_event (Gpm_Event * event, void *x)
{
int result;
if (edit_event ((WEdit *) x, event, &result))
return result;
else
return menubar_event (event, edit_menubar);
}
extern Menu EditMenuBar[5];
int edit (const char *_file, int line)
{
static int made_directory = 0;
int framed = 0;
int midnight_colors[4];
char *text = 0;
if (option_backup_ext_int != -1) {
option_backup_ext = malloc (sizeof(int) + 1);
option_backup_ext[sizeof(int)] = '\0';
memcpy (option_backup_ext, (char *) &option_backup_ext_int, sizeof (int));
}
if (!made_directory) {
mkdir (catstrs (home_dir, EDIT_DIR, 0), 0700);
made_directory = 1;
}
if (_file) {
if (!(*_file)) {
_file = 0;
text = "";
}
} else
text = "";
if (!(wedit = edit_init (NULL, LINES - 2, COLS, _file, text, "", 0))) {
message (1, _(" Error "), get_error_msg (""));
return 0;
}
wedit->macro_i = -1;
/* Create a new dialog and add it widgets to it */
edit_dlg = create_dlg (0, 0, LINES, COLS, midnight_colors,
edit_mode_callback, "[Internal File Editor]",
"edit",
DLG_NONE);
edit_dlg->raw = 1; /*so that tab = '\t' key works */
init_widget (&(wedit->widget), 0, 0, LINES - 1, COLS,
(callback_fn) edit_callback,
(destroy_fn) edit_clean,
(mouse_h) edit_mouse_event, 0);
widget_want_cursor (wedit->widget, 1);
edit_bar = buttonbar_new (1);
if (!framed) {
switch (edit_key_emulation) {
case EDIT_KEY_EMULATION_NORMAL:
edit_init_menu_normal (); /* editmenu.c */
break;
case EDIT_KEY_EMULATION_EMACS:
edit_init_menu_emacs (); /* editmenu.c */
break;
}
edit_menubar = menubar_new (0, 0, COLS, EditMenuBar, N_menus);
}
add_widget (edit_dlg, wedit);
if (!framed)
add_widget (edit_dlg, edit_menubar);
add_widget (edit_dlg, edit_bar);
edit_move_display (wedit, line - 1);
edit_move_to_line (wedit, line - 1);
run_dlg (edit_dlg);
if (!framed)
edit_done_menu (); /* editmenu.c */
destroy_dlg (edit_dlg);
return 1;
}
static void edit_my_define (Dlg_head * h, int idx, char *text,
void (*fn) (WEdit *), WEdit * edit)
{
define_label_data (h, (Widget *) edit, idx, text, (buttonbarfn) fn, edit);
}
void cmd_F1 (WEdit * edit)
{
send_message (edit->widget.parent, (Widget *) edit, WIDGET_KEY, KEY_F (1));
}
void cmd_F2 (WEdit * edit)
{
send_message (edit->widget.parent, (Widget *) edit, WIDGET_KEY, KEY_F (2));
}
void cmd_F3 (WEdit * edit)
{
send_message (edit->widget.parent, (Widget *) edit, WIDGET_KEY, KEY_F (3));
}
void cmd_F4 (WEdit * edit)
{
send_message (edit->widget.parent, (Widget *) edit, WIDGET_KEY, KEY_F (4));
}
void cmd_F5 (WEdit * edit)
{
send_message (edit->widget.parent, (Widget *) edit, WIDGET_KEY, KEY_F (5));
}
void cmd_F6 (WEdit * edit)
{
send_message (edit->widget.parent, (Widget *) edit, WIDGET_KEY, KEY_F (6));
}
void cmd_F7 (WEdit * edit)
{
send_message (edit->widget.parent, (Widget *) edit, WIDGET_KEY, KEY_F (7));
}
void cmd_F8 (WEdit * edit)
{
send_message (edit->widget.parent, (Widget *) edit, WIDGET_KEY, KEY_F (8));
}
void cmd_F9 (WEdit * edit)
{
send_message (edit->widget.parent, (Widget *) edit, WIDGET_KEY, KEY_F (9));
}
void cmd_F10 (WEdit * edit)
{
send_message (edit->widget.parent, (Widget *) edit, WIDGET_KEY, KEY_F (10));
}
void edit_labels (WEdit * edit)
{
Dlg_head *h = edit->widget.parent;
edit_my_define (h, 1, _("Help"), cmd_F1, edit);
edit_my_define (h, 2, _("Save"), cmd_F2, edit);
edit_my_define (h, 3, _("Mark"), cmd_F3, edit);
edit_my_define (h, 4, _("Replac"), cmd_F4, edit);
edit_my_define (h, 5, _("Copy"), cmd_F5, edit);
edit_my_define (h, 6, _("Move"), cmd_F6, edit);
edit_my_define (h, 7, _("Search"), cmd_F7, edit);
edit_my_define (h, 8, _("Delete"), cmd_F8, edit);
if (!edit->have_frame)
edit_my_define (h, 9, _("PullDn"), edit_menu_cmd, edit);
edit_my_define (h, 10, _("Quit"), cmd_F10, edit);
redraw_labels (h, (Widget *) edit);
}
long get_key_state ()
{
return (long) get_modifier ();
}
void edit_adjust_size (Dlg_head * h)
{
WEdit *edit;
WButtonBar *edit_bar;
edit = (WEdit *) find_widget_type (h, (callback_fn) edit_callback);
edit_bar = (WButtonBar *) edit->widget.parent->current->next->widget;
widget_set_size (&edit->widget, 0, 0, LINES - 1, COLS);
widget_set_size (&edit_bar->widget, LINES - 1, 0, 1, COLS);
}
void edit_update_screen (WEdit * e)
{
edit_scroll_screen_over_cursor (e);
edit_update_curs_col (e);
edit_status (e);
/* pop all events for this window for internal handling */
if (!is_idle ()) {
e->force |= REDRAW_PAGE;
return;
}
if (e->force & REDRAW_COMPLETELY)
e->force |= REDRAW_PAGE;
edit_render_keypress (e);
}
static int edit_callback (Dlg_head * h, WEdit * e, int msg, int par)
{
switch (msg) {
case WIDGET_INIT:
e->force |= REDRAW_COMPLETELY;
edit_labels (e);
break;
case WIDGET_DRAW:
e->force |= REDRAW_COMPLETELY;
e->num_widget_lines = LINES - 2;
e->num_widget_columns = COLS;
case WIDGET_FOCUS:
edit_update_screen (e);
return 1;
case WIDGET_KEY:{
int cmd, ch;
if (edit_drop_hotkey_menu (e, par)) /* first check alt-f, alt-e, alt-s, etc for drop menus */
return 1;
if (!edit_translate_key (e, 0, par, get_key_state (), &cmd, &ch))
return 0;
edit_execute_key_command (e, cmd, ch);
edit_update_screen (e);
}
return 1;
case WIDGET_COMMAND:
edit_execute_key_command (e, par, -1);
edit_update_screen (e);
return 1;
case WIDGET_CURSOR:
widget_move (&e->widget, e->curs_row + EDIT_TEXT_VERTICAL_OFFSET, e->curs_col + e->start_col);
return 1;
}
return default_proc (h, msg, par);
}
#endif

350
edit/wordproc.c Normal file
View File

@ -0,0 +1,350 @@
/* wordproc.c - word-processor mode for the editor: does dynamic
paragraph formatting.
Copyright (C) 1996 Paul Sheer
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You 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.
*/
#include <config.h>
#include "edit.h"
#ifdef MIDNIGHT
#define tab_width option_tab_spacing
#endif
int line_is_blank (WEdit * edit, long line);
#define NO_FORMAT_CHARS_START "-+*\\,.;:&>"
static long line_start (WEdit * edit, long line)
{
static long p = -1, l = 0;
int c;
if (p == -1 || abs (l - line) > abs (edit->curs_line - line)) {
l = edit->curs_line;
p = edit->curs1;
}
if (line < l)
p = edit_move_backward (edit, p, l - line);
else if (line > l)
p = edit_move_forward (edit, p, line - l, 0);
l = line;
p = edit_bol (edit, p);
while (strchr ("\t ", c = edit_get_byte (edit, p)))
p++;
return p;
}
static int bad_line_start (WEdit * edit, long p)
{
int c;
c = edit_get_byte (edit, p);
if (c == '.') { /* `...' is acceptable */
if (edit_get_byte (edit, p + 1) == '.')
if (edit_get_byte (edit, p + 2) == '.')
return 0;
return 1;
}
if (c == '-') {
if (edit_get_byte (edit, p + 1) == '-')
if (edit_get_byte (edit, p + 2) == '-')
return 0; /* `---' is acceptable */
return 1;
}
if (strchr (NO_FORMAT_CHARS_START, c))
return 1;
return 0;
}
static long begin_paragraph (WEdit * edit, long p, int force)
{
int i;
for (i = edit->curs_line - 1; i > 0; i--) {
if (line_is_blank (edit, i)) {
i++;
break;
}
if (force) {
if (bad_line_start (edit, line_start (edit, i))) {
i++;
break;
}
}
}
return edit_move_backward (edit, edit_bol (edit, edit->curs1), edit->curs_line - i);
}
static long end_paragraph (WEdit * edit, long p, int force)
{
int i;
for (i = edit->curs_line + 1; i < edit->total_lines; i++) {
if (line_is_blank (edit, i)) {
i--;
break;
}
if (force)
if (bad_line_start (edit, line_start (edit, i))) {
i--;
break;
}
}
return edit_eol (edit, edit_move_forward (edit, edit_bol (edit, edit->curs1), i - edit->curs_line, 0));
}
static char *get_paragraph (WEdit * edit, long p, long q, int indent, int *size)
{
char *s, *t;
t = malloc ((q - p) + 2 * (q - p) / option_word_wrap_line_length + 10);
if (!t)
return 0;
for (s = t; p < q; p++, s++) {
if (indent)
if (edit_get_byte (edit, p - 1) == '\n')
while (strchr ("\t ", edit_get_byte (edit, p)))
p++;
*s = edit_get_byte (edit, p);
}
*size = (unsigned long) s - (unsigned long) t;
t[*size] = '\n';
return t;
}
static void strip_newlines (char *t, int size)
{
char *p = t;
while (size--) {
*p = *p == '\n' ? ' ' : *p;
p++;
}
}
#ifndef MIDNIGHT
int edit_width_of_long_printable (int c);
#endif
/*
This is a copy of the function
int calc_text_pos (WEdit * edit, long b, long *q, int l)
in propfont.c :(
It calculates the number of chars in a line specified to length l in pixels
*/
extern int tab_width;
static inline int next_tab_pos (int x)
{
return x += tab_width - x % tab_width;
}
static int line_pixel_length (char *t, long b, int l)
{
int x = 0, c, xn = 0;
for (;;) {
c = t[b];
switch (c) {
case '\n':
return b;
case '\t':
xn = next_tab_pos (x);
break;
default:
#ifdef MIDNIGHT
xn = x + 1;
#else
xn = x + edit_width_of_long_printable (c);
#endif
break;
}
if (xn > l)
break;
x = xn;
b++;
}
return b;
}
/* find the start of a word */
static int next_word_start (char *t, int q, int size)
{
int i;
for (i = q;; i++) {
switch (t[i]) {
case '\n':
return -1;
case '\t':
case ' ':
for (;; i++) {
if (t[i] == '\n')
return -1;
if (t[i] != ' ' && t[i] != '\t')
return i;
}
break;
}
}
}
/* find the start of a word */
static int word_start (char *t, int q, int size)
{
int i = q;
if (t[q] == ' ' || t[q] == '\t')
return next_word_start (t, q, size);
for (;;) {
int c;
if (!i)
return -1;
c = t[i - 1];
if (c == '\n')
return -1;
if (c == ' ' || c == '\t')
return i;
i--;
}
}
/* replaces ' ' with '\n' to properly format a paragraph */
static void format_this (char *t, int size, int indent)
{
int q = 0, ww;
strip_newlines (t, size);
ww = option_word_wrap_line_length * FONT_MEAN_WIDTH - indent;
if (ww < FONT_MEAN_WIDTH * 2)
ww = FONT_MEAN_WIDTH * 2;
for (;;) {
int p;
q = line_pixel_length (t, q, ww);
if (q > size)
break;
if (t[q] == '\n')
break;
p = word_start (t, q, size);
if (p == -1)
q = next_word_start (t, q, size); /* Return the end of the word if the beginning
of the word is at the beginning of a line
(i.e. a very long word) */
else
q = p;
if (q == -1) /* end of paragraph */
break;
if (q)
t[q - 1] = '\n';
}
}
static void replace_at (WEdit * edit, long q, int c)
{
edit_cursor_move (edit, q - edit->curs1);
edit_delete (edit);
edit_insert_ahead (edit, c);
}
void edit_insert_indent (WEdit * edit, int indent);
/* replaces a block of text */
static void put_paragraph (WEdit * edit, char *t, long p, long q, int indent, int size)
{
long cursor;
int i, c = 0;
cursor = edit->curs1;
if (indent)
while (strchr ("\t ", edit_get_byte (edit, p)))
p++;
for (i = 0; i < size; i++, p++) {
if (i && indent) {
if (t[i - 1] == '\n' && c == '\n') {
while (strchr ("\t ", edit_get_byte (edit, p)))
p++;
} else if (t[i - 1] == '\n') {
long curs;
edit_cursor_move (edit, p - edit->curs1);
curs = edit->curs1;
edit_insert_indent (edit, indent);
if (cursor >= curs)
cursor += edit->curs1 - p;
p = edit->curs1;
} else if (c == '\n') {
edit_cursor_move (edit, p - edit->curs1);
while (strchr ("\t ", edit_get_byte (edit, p))) {
edit_delete (edit);
if (cursor > edit->curs1)
cursor--;
}
p = edit->curs1;
}
}
c = edit_get_byte (edit, p);
if (c != t[i])
replace_at (edit, p, t[i]);
}
edit_cursor_move (edit, cursor - edit->curs1); /* restore cursor position */
}
int edit_indent_width (WEdit * edit, long p);
static int test_indent (WEdit * edit, long p, long q)
{
int indent;
indent = edit_indent_width (edit, p++);
if (!indent)
return 0;
for (; p < q; p++)
if (edit_get_byte (edit, p - 1) == '\n')
if (indent != edit_indent_width (edit, p))
return 0;
return indent;
}
void format_paragraph (WEdit * edit, int force)
{
long p, q;
int size;
char *t;
int indent = 0;
if (option_word_wrap_line_length < 2)
return;
if (line_is_blank (edit, edit->curs_line))
return;
p = begin_paragraph (edit, edit->curs1, force);
q = end_paragraph (edit, edit->curs1, force);
indent = test_indent (edit, p, q);
t = get_paragraph (edit, p, q, indent, &size);
if (!t)
return;
if (!force) {
int i;
if (strchr (NO_FORMAT_CHARS_START, *t)) {
free (t);
return;
}
for (i = 0; i < size - 1; i++) {
if (t[i] == '\n') {
if (strchr (NO_FORMAT_CHARS_START "\t ", t[i + 1])) {
free (t);
return;
}
}
}
}
format_this (t, q - p, indent);
put_paragraph (edit, t, p, q, indent, size);
free (t);
}

138
gnome/Makefile.in Normal file
View File

@ -0,0 +1,138 @@
srcdir = @srcdir@
VPATH = @srcdir@
rootdir = $(srcdir)/..
@MCFG@@MCF@
CFLAGS = $(XCFLAGS) @X_CFLAGS@
CPPFLAGS = $(XCPPFLAGS) -I$(vfsdir) -I$(slangdir) -DHAVE_X -DHAVE_GNOME
LDFLAGS = $(XLDFLAGS) @X_LIBS@
DEFS = $(XDEFS)
LIBS = -lgnomeui -lgnome -lgtk -lgdk -lglib @X_EXTRA_LIBS@ -lX11 @X_PRE_LIBS@ $(XLIBS) $(XLIB) @TERMNET@
EXTRALIBS = @LVFS@ @LSLANG@ @LEDIT@
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
GNOMESRCS = gkey.c gmain.c gscreen.c gwidget.c \
gmenu.c ginfo.c ghelp.c glayout.c gtools.c
GNOMEHDRS = gmain.h gscreen.h gwidget.h gconf.h
#
# These objects from ../src do not depend on HAVE_X / HAVE_GNOME??
#
LOBJS = mad.o
#
# These objects from ../src do depend on HAVE_GNOME
#
OOBJS = main.o dlg.o screen.o widget.o wtools.o info.o boxes.o \
file.o find.o dialog.o help.o key.o chmod.o chown.o view.o \
panelize.o hotlist.o listmode.o background.o dir.o util.o \
win.o color.o profile.o user.o ext.o setup.o tree.o \
subshell.o terms.o achown.o fsusage.o mountlist.o \
@XCURSES@ @REGEX_O@ complete.o command.o \
option.o cmd.o utilunix.o dirhist.o popt.o xslint.o
OBJS = $(LOBJS) $(OOBJS) \
gkey.o gmain.o gscreen.o gwidget.o gmenu.o ghelp.o ginfo.o \
glayout.o gtools.o gdesktop.o
#
# Distribution variables
#
PIXMAPS = directory.xpm
DISTGNOME = Makefile.in gnome.TODO $(PIXMAPS) $(GNOMESRCS) $(GNOMEHDRS)
.c.o:
$(CC) -c $(CPPFLAGS) $(DEFS) $(CFLAGS) $<
all: @gmc@
gmc: checklinks
$(MAKE) mx
mx: @LIBVFS@ $(OBJS) @LIBSLANG@ @LIBEDIT_A@
$(CC) $(LDFLAGS) -o gmc $(OBJS) -L../vfs -L../slang -L../edit $(EXTRALIBS) $(LIBS)
touch mx
libvfs.a:
cd ../vfs; $(MAKE) libvfs.a
@PCENTRULE@ -$(RMF) libvfs.a
@PCENTRULE@ $(LN_S) ../vfs/libvfs.a .
libmcslang.a:
cd ../slang; $(MAKE) libmcslang.a
@PCENTRULE@ -$(RMF) libmcslang.a
@PCENTRULE@ $(LN_S) ../slang/libmcslang.a .
libedit.a:
cd ../edit; $(MAKE) libedit.a
@PCENTRULE@ -$(RMF) libedit.a
@PCENTRULE@ $(LN_S) ../edit/libedit.a .
checklinks:
@if test -f $(gnomedir)/regex.c; then echo ok; \
else $(MAKE) sourcelinks; fi
@if test -f regex.o; then echo ok; else $(MAKE) links; fi
links:
for I in $(LOBJS); do $(RMF) $$I; $(LN_S) ../src/$$I $$I >/dev/null 2>&1; done; true
sourcelinks:
-cd $(gnomedir); $(LN_S) ../src/*.[ch] . >/dev/null 2>&1; $(LN_S) ../src/*.inc .; true
cleansourcelinks:
-if test -f $(gnomedir)/regex.c; then \
cd $(gnomedir); find . \( -lname '*.[ch]' -o -lname '*.inc' \) | xargs $(RM); \
fi
check:
@echo no tests are supplied.
cross:
$(MAKE) CC=gcc-linux CPP="gcc-linux -E" \
CPPFLAGS="$(CPPFLAGS) -I/usr/local/lib/gcc-lib/i386-linux-linux/include/ncurses "
TAGS: $(GNOMESRCS)
etags $(GNOMESRCS)
clean:
$(RMF) @tkmc@ *.o core a.out mx libvfs.a libedit.a libmcslang.a
realclean: clean
$(RMF) .depend
$(RMF) TAGS
$(RMF) *~
distclean: cleansourcelinks
-$(RMF) $(srcdir)/*~ $(srcdir)/*.o $(srcdir)/tkmc $(srcdir)/core
-$(RMF) $(srcdir)/a.out
-if test $(srcdir) = .; then $(MAKE) realclean; fi
-$(RMF) $(srcdir)/Makefile gui.tcl
distcopy:
$(CP) $(DISTGNOME) ../../mc-$(VERSION)/gnome
install: install_@gmc@
install_:
install_gmc: all
$(INSTALL_PROGRAM) gmc $(DESTDIR)$(bindir)/$(binprefix)gmc
uninstall:
-$(RMF) $(DESTDIR)$(bindir)/$(binprefix)gmc
depend dep: @gmcdep@
gmcdep: checklinks mcdep
fastdeploc: @fastdepslang@ @fastdepvfs@
# ***Dependencies***Do not edit***
@DOTDEPEND@
# ***End of dependencies***

21
gnome/directory.xpm Normal file
View File

@ -0,0 +1,21 @@
/* XPM */
static char * directory_xpm[] = {
"16 13 5 1",
" c None",
". c #000000000000",
"X c #FFFFFFFFFFFF",
"o c #FFFFFFFF79E7",
"O c #C71BC30B0000",
" ..... ",
".XXXXo. ",
".XoooOo.........",
".XooooOXXXXXXXo.",
".XooooooooooooO.",
".XooooooooooooO.",
".XooooooooooooO.",
".XooooooooooooO.",
".XooooooooooooO.",
".XooooooooooooO.",
".XooooooooooooO.",
".oOOOOOOOOOOOOO.",
"................"};

17
gnome/gconf.h Normal file
View File

@ -0,0 +1,17 @@
/* Defines which features are used on the GNOME edition */
#define PORT_HAS_FRONTEND_RUN_DLG 1
#define PORT_HAS_FILE_HANDLERS 1
#define PORT_HAS_GETCH 1
#define PORT_HAS_DIALOG_TITLE 1
#define PORT_WANTS_CLEAN_BUTTON 1
#define PORT_HAS_CREATE_PANELS 1
#define PORT_HAS_PANEL_UPDATE_COLS 1
#define PORT_HAS_PAINT_FRAME 1
#define PORT_WANTS_GET_SORT_FN 1
#define PORT_HAS_LLINES 1
#define PORT_HAS_LOAD_HINT 1
#define mi_getch() fprintf (stderr, "mi_getch is not implemented in this port\n")
#define frontend_run_dlg(x) gtkrundlg_event (x)

12
gnome/ghelp.c Normal file
View File

@ -0,0 +1,12 @@
/*
* GNU Midnight Commander/GNOME edition: Help support
* (C) 1997 The Free Software Foundation
*
* Author: Miguel de Icaza (miguel@gnu.org)
*/
void
x_interactive_display ()
{
printf ("show help\n");
}

31
gnome/ginfo.c Normal file
View File

@ -0,0 +1,31 @@
/*
*
*/
#include <config.h>
#include <string.h>
#include <stdlib.h>
#include <string.h>
#include "fs.h"
#include "dlg.h"
#include "widget.h"
#include "info.h"
#include "win.h"
#include "x.h"
/* The following three include files are needed for cpanel */
#include "main.h"
#include "dir.h"
#include "panel.h"
void
x_create_info (Dlg_head *h, widget_data parent, WInfo *info)
{
printf ("create info\n");
}
void
x_show_info (WInfo *info, struct my_statfs *s, struct stat *b)
{
printf ("updating info\n");
}

80
gnome/gkey.c Normal file
View File

@ -0,0 +1,80 @@
/*
* Midnight Commander -- GNOME edition
*
* Copyright 1997 The Free Software Foundation
*
* Author:Miguel de Icaza (miguel@gnu.org)
*/
#include <config.h>
#include "x.h"
#include "key.h"
/* The tty.h file is included since we try to use as much object code
* from the curses distribution as possible so we need to send back
* the same constants that the code expects on the non-X version
* of the code. The constants may be the ones from curses/ncurses
* or our macro definitions for slang
*/
struct trampoline {
select_fn fn;
void *fn_closure;
int fd;
int tag;
};
void
callback_trampoline (gpointer data, gint source, GdkInputCondition condition)
{
struct trampoline *t = data;
/* return value is ignored */
(*t->fn)(source, t->fn_closure);
}
/*
* We need to keep track of the select callbacks, as we need to release
* the trampoline closure.
*/
GList *select_list;
void
add_select_channel (int fd, select_fn callback, void *info)
{
struct trampoline *t;
t = xmalloc (sizeof (struct trampoline), "add_select_channel");
t->fn = callback;
t->fd = fd;
t->fn_closure = info;
t->tag = gdk_input_add (fd, GDK_INPUT_READ, callback_trampoline, t);
g_list_prepend (select_list, t);
}
static struct trampoline *tclosure;
static void
find_select_closure_callback (gpointer data, gpointer user_data)
{
struct trampoline *t = data;
int *pfd = (int *) user_data;
if (t->fd = *pfd)
tclosure = data;
}
void
delete_select_channel (int fd)
{
tclosure = 0;
g_list_foreach (select_list, find_select_closure_callback, &fd);
if (tclosure){
g_list_remove (select_list, tclosure);
gdk_input_remove (tclosure->tag);
free (tclosure);
} else {
fprintf (stderr, "PANIC: could not find closure for %d\n", fd);
}
}

240
gnome/glayout.c Normal file
View File

@ -0,0 +1,240 @@
#include "x.h"
#include <stdio.h>
#include <sys/stat.h>
#include "dir.h"
#include "panel.h"
#include "gscreen.h"
#include "cmd.h"
typedef struct {
int splitted;
WPanel *panel;
enum view_modes other_display;
Widget *other;
} PanelContainer;
GList *containers;
int output_lines = 0;
int command_prompt = 1;
int keybar_visible = 1;
int message_visible = 1;
int xterm_hintbar = 0;
PanelContainer *current_panel_ptr, *other_panel_ptr;
WPanel *
get_current_panel (void)
{
return current_panel_ptr->panel;
}
WPanel *
get_other_panel (void)
{
if (other_panel_ptr)
return other_panel_ptr->panel;
else
return NULL;
}
/* FIXME: we probably want to get rid of this code */
int
get_current_index (void)
{
GList *p;
int i;
for (i = 0, p = containers; p; p = p->next, i++){
if (p->data == current_panel_ptr)
return i;
}
printf ("FATAL: current panel is not in the list\n");
}
int
get_other_index (void)
{
GList *p;
int i;
for (i = 0, p = containers; p; p = p->next, i++){
if (p->data == other_panel_ptr)
return i;
}
return -1;
}
void
set_current_panel (int index)
{
GList *p;
for (p = containers; index; p = p->next)
index--;
current_panel_ptr = p->data;
}
void
print_vfs_message (char *msg)
{
}
void
rotate_dash (void)
{
}
int
get_current_type (void)
{
return current_panel_ptr->panel->list_type;
}
int
get_other_type (void)
{
/* FIXME: This is returning CURRENT panel */
return view_nothing;
}
int
get_display_type (int index)
{
GList *p;
p = g_list_nth (containers, index);
if (p)
return ((PanelContainer *)p->data)->panel->list_type;
else
return -1;
}
void
use_dash (int ignore)
{
/* we dont care in the gnome edition */
}
Widget *
get_panel_widget (int index)
{
GList *p;
for (p = containers; index; p = p->next)
index--;
return (Widget *) ((PanelContainer *)p->data)->panel;
}
void
gnome_listing_cmd (void)
{
int view_type, use_msformat;
char *user, *status;
WPanel *p;
int index = 0;
fprintf (stderr, "FIXME: index is hardcoded to 0 now\n");
p = (WPanel *)get_panel_widget (index);
view_type = display_box (p, &user, &status, &use_msformat, index);
if (view_type == -1)
return;
}
void configure_box (void);
GnomeUIInfo gnome_panel_filemenu [] = {
{ GNOME_APP_UI_ITEM, "Network link...", NULL, netlink_cmd },
{ GNOME_APP_UI_ITEM, "FTP link...", NULL, ftplink_cmd },
{ GNOME_APP_UI_ITEM, "Display mode...", NULL, gnome_listing_cmd },
{ GNOME_APP_UI_ITEM, "Sort order...", NULL, NULL },
{ GNOME_APP_UI_ITEM, "Filter...", NULL, NULL },
{ GNOME_APP_UI_ITEM, "Rescan", NULL, NULL },
{ GNOME_APP_UI_ITEM, "Find", NULL, find_cmd },
{ GNOME_APP_UI_ITEM, "Hotlist", NULL, quick_chdir_cmd },
#ifdef USE_VFS
{ GNOME_APP_UI_ITEM, "Active VFS", NULL, reselect_vfs },
#endif
{ GNOME_APP_UI_ITEM, "Options", NULL, configure_box },
{ GNOME_APP_UI_ENDOFINFO, 0, 0 }
};
GnomeUIInfo gnome_panel_menu [] = {
{ GNOME_APP_UI_SUBTREE, "File", NULL, &gnome_panel_filemenu },
{ GNOME_APP_UI_ENDOFINFO, 0, 0 }
};
int
dialog_panel_callback (struct Dlg_head *h, int id, int msg)
{
return default_dlg_callback (h, id, msg);
}
void
gnome_init_panels ()
{
containers = g_list_alloc ();
current_panel_ptr = NULL;
other_panel_ptr = NULL;
}
void
create_container (char *name)
{
PanelContainer *container = g_new (PanelContainer, 1);
WPanel *panel;
GtkWidget *app, *vbox;
Dlg_head *h;
int slot;
container->splitted = 0;
app = gnome_app_new ("gmc", name);
gtk_widget_set_usize (GTK_WIDGET (app), 400, 200);
vbox = gtk_vbox_new (0, 0);
gtk_widget_show (vbox);
gnome_app_set_contents (GNOME_APP (app), vbox);
gnome_app_create_menus (GNOME_APP (app), gnome_panel_menu);
gtk_widget_show (app);
panel = panel_new (name);
container->panel = panel;
containers = g_list_append (containers, container);
if (!current_panel_ptr){
current_panel_ptr = container;
} else if (!other_panel_ptr)
other_panel_ptr = container;
h = create_dlg (0, 0, 24, 80, 0, dialog_panel_callback, "[panel]", "midnight", DLG_NO_TED);
add_widget (h, panel);
bind_gtk_keys (GTK_WIDGET (app), h);
gtk_object_set_data (GTK_OBJECT (h->wdata), "parent-container", vbox);
run_dlg (h);
}
void
setup_panels (void)
{
load_hint ();
}
void
set_hintbar (char *str)
{
g_panel_contents *gp;
gp = (g_panel_contents *) current_panel_ptr->panel->widget.wdata;
gtk_label_set (GTK_LABEL (gp->status), str);
}

256
gnome/gmain.c Normal file
View File

@ -0,0 +1,256 @@
/*
* Midnight Commander -- GNOME frontend
*
* Copyright (C) 1997 The Free Software Foundation
*
* Author: Miguel de Icaza (miguel@gnu.org)
*
*/
#include <config.h>
#include <stdarg.h>
#include <string.h>
#include <ctype.h>
#define WANT_WIDGETS
#include "x.h"
#include "main.h"
#include "key.h"
#include "global.h"
#include "dir.h"
#include "panel.h"
#include "tty.h" /* for KEY_BACKSPACE */
#include "command.h"
GdkColorContext *mc_cc;
#define MAX_COLOR_PAIRS 32
struct gmc_color_pairs_s gmc_color_pairs [MAX_COLOR_PAIRS];
char *default_edition_colors =
"directory=blue:"
"execute=green:"
"link=yellow:"
"device=magenta:"
"core=red:"
"special=black";
void
init_pair (int index, GdkColor *fore, GdkColor *back)
{
if (index < 0 || index > MAX_COLOR_PAIRS){
printf ("init_pair called with invalid index\n");
exit (1);
}
gmc_color_pairs [index].fore = fore;
gmc_color_pairs [index].back = back;
}
void
get_color (char *cpp, GdkColor **colp)
{
GdkColor *new_color;
gint status;
new_color = g_new (GdkColor, 1);
gdk_color_parse (cpp, new_color);
new_color->pixel = gdk_color_context_get_pixel (mc_cc, new_color->red, new_color->green, new_color->blue, &status);
*colp = new_color;
}
static void
gmc_color_init (void)
{
mc_cc = gdk_color_context_new (gtk_widget_get_default_visual (),
gtk_widget_get_default_colormap ());
}
int
xtoolkit_init (int *argc, char *argv [])
{
LINES = 40;
COLS = 80;
gnome_init ("gmc", argc, &argv);
gmc_color_init ();
}
int
xtoolkit_end (void)
{
return 1;
}
int
dialog_key_pressed (GtkWidget *win, GdkEventKey *event, Dlg_head *h)
{
static int on_escape;
int key;
printf ("evento: 0x%02x (%c)\n", key, key);
key = translate_gdk_keysym_to_curses (event);
printf ("evento: 0x%02x (%c)\n", key, key);
if (key == -1)
return FALSE;
printf ("tecla buenera (%s)\n", on_escape ? "escapada" : "normal");
if (!on_escape){
if (key == 27){
on_escape = 1;
gtk_signal_emit_stop_by_name (GTK_OBJECT (win), "key_press_event");
return TRUE;
}
} else {
if (key != 27){
if (key >= '0' && key <= '9')
key = KEY_F(key - '0');
else
key = ALT (key);
if (key == ALT('<'))
key = KEY_HOME;
if (key == ALT('>'))
key = KEY_END;
}
on_escape = 0;
}
gtk_signal_emit_stop_by_name (GTK_OBJECT (win), "key_press_event");
printf ("Mandando: %04x\n", key);
dlg_key_event (h, key);
return TRUE;
}
void
bind_gtk_keys (GtkWidget *w, Dlg_head *h)
{
gtk_signal_connect (GTK_OBJECT (w),
"key_press_event",
GTK_SIGNAL_FUNC (dialog_key_pressed),
h);
}
widget_data
xtoolkit_create_dialog (Dlg_head *h, int flags)
{
GtkWidget *win, *ted;
win = gtk_window_new (GTK_WINDOW_TOPLEVEL);
h->grided = flags;
if (!(flags & DLG_NO_TED)){
ted = gtk_ted_new (h->name);
gtk_container_add (GTK_CONTAINER (win), ted);
gtk_widget_show (ted);
bind_gtk_keys (GTK_WIDGET (ted), h);
}
bind_gtk_keys (GTK_WIDGET (win), h);
return (widget_data) win;
}
void
x_set_dialog_title (Dlg_head *h, char *title)
{
gtk_window_set_title (GTK_WINDOW (h->wdata), title);
}
widget_data
xtoolkit_get_main_dialog (Dlg_head *h)
{
GtkWidget *win;
win = gtk_window_new (GTK_WINDOW_TOPLEVEL);
return (widget_data) win;
}
/* Creates the containers */
widget_data
x_create_panel_container (int which)
{
GtkWidget *win;
win = gtk_window_new (GTK_WINDOW_TOPLEVEL);
return (widget_data) 0;
}
void
x_panel_container_show (widget_data wdata)
{
printf ("x_panel_container_show\n");
gtk_widget_show (GTK_WIDGET (wdata));
}
void
x_focus_widget (Widget_Item *p)
{
gtk_widget_grab_focus (GTK_WIDGET (p->widget->wdata));
}
void
x_init_dlg (Dlg_head *h)
{
if (!(h->grided & DLG_NO_TED)){
GtkTed *ted = GTK_TED (GTK_BIN (h->wdata)->child);
Widget_Item *p, *first;
first = p = h->current;
do {
gtk_ted_add (ted, GTK_WIDGET (p->widget->wdata), p->widget->tkname);
bind_gtk_keys (GTK_WIDGET (p->widget->wdata), h);
p = p->next;
} while (p != first);
gtk_ted_prepare (ted);
gtk_grab_add (GTK_WIDGET (ted));
gtk_widget_show (GTK_WIDGET (h->wdata));
}
}
void
x_destroy_dlg (Dlg_head *h)
{
gtk_widget_destroy (GTK_WIDGET(h->wdata));
}
void
gtkrundlg_event (Dlg_head *h)
{
gtk_main ();
}
void
edition_pre_exec ()
{
}
void
edition_post_exec ()
{
}
void
done_screen ()
{
}
void
setup_sigwinch ()
{
}
void
create_panels (void)
{
Dlg_head *h;
start_desktop ();
cmdline = command_new (0, 0, 0);
the_hint = label_new (0, 0, 0, NULL);
gnome_init_panels ();
create_container ("My Panel");
set_current_panel (0);
}

31
gnome/gmain.h Normal file
View File

@ -0,0 +1,31 @@
#ifndef __GMC_MAIN_H
#define __GMC_MAIN_H
#include "dlg.h"
#include "widget.h"
int xtoolkit_init (int *argc, char *argv []);
int xtoolkit_end (void);
/* Required by the standard code */
widget_data xtoolkit_create_dialog (Dlg_head *h, int with_grid);
widget_data xtoolkit_get_main_dialog (Dlg_head *h);
widget_data x_create_panel_container (int which);
void x_panel_container_show (widget_data wdata);
void x_destroy_cmd (void *);
int x_create_radio (Dlg_head *h, widget_data parent, WRadio *r);
int x_create_check (Dlg_head *h, widget_data parent, WCheck *c);
int x_create_label (Dlg_head *h, widget_data parent, WLabel *l);
int x_create_input (Dlg_head *h, widget_data parent, WInput *in);
int x_create_listbox (Dlg_head *h, widget_data parent, WListbox *l);
int x_create_buttonbar (Dlg_head *h, widget_data parent, WButtonBar *bb);
void x_list_insert (WListbox *l, WLEntry *p, WLEntry *e);
void x_redefine_label (WButtonBar *bb, int idx);
struct gmc_color_pairs_s {
GdkColor *fore, *back;
};
extern struct gmc_color_pairs_s gmc_color_pairs [];
#endif

88
gnome/gmenu.c Normal file
View File

@ -0,0 +1,88 @@
/*
* GNU Midnight Commander/GNOME edition: Pulldown menu code
*
* Copyright (C) 1997 the Free Software Foundation.
*
* Author: Miguel de Icaza (miguel@gnu.org)
*/
#include <config.h>
#include <string.h>
#include <malloc.h>
#include "main.h"
#include "mad.h"
#include "menu.h"
#include "x.h"
/* Unused but required by the rest of the code */
int menubar_visible = 1;
/* We assume that menu titles are only one word length */
Menu create_menu (char *name, menu_entry *entries, int count)
{
Menu menu;
menu = (Menu) xmalloc (sizeof (*menu), "create_menu");
menu->count = count;
menu->max_entry_len = 0;
menu->entries = entries;
menu->name = name;
return menu;
}
static int menubar_callback (Dlg_head *h, WMenu *menubar, int msg, int par)
{
if (msg == WIDGET_FOCUS)
return 0;
return default_proc (h, msg, par);
}
int menubar_event (Gpm_Event *event, WMenu *menubar)
{
return MOU_NORMAL;
}
static void menubar_destroy (WMenu *menubar)
{
/* nothing yet */
}
WMenu *menubar_new (int y, int x, int cols, Menu menu [], int items)
{
WMenu *menubar = (WMenu *) xmalloc (sizeof (WMenu), "menubar_new");
GtkWidget *g_menubar;
int i, j;
init_widget (&menubar->widget, y, x, 1, cols, (callback_fn) menubar_callback,
(destroy_fn) menubar_destroy, (mouse_h) menubar_event, NULL);
menubar->menu = menu;
menubar->active = 0;
menubar->dropped = 0;
menubar->items = items;
menubar->selected = 0;
widget_want_cursor (menubar->widget, 0);
g_menubar = gtk_menu_bar_new ();
gtk_widget_show (g_menubar);
menubar->widget.wdata = g_menubar;
for (i = 0; i < items; i++){
GtkWidget *child;
child = gtk_menu_new ();
for (j = 0; j < menu [i]->count; j++){
GtkWidget *entry;
entry = gtk_label_new (menu [i]->entries->text);
gtk_object_set_data (GTK_OBJECT(entry), "callback", &menu [i]->entries);
gtk_widget_show (entry);
gtk_menu_append (GTK_MENU (child), entry);
/* FIXME: gtk_signal_connect (.... "activate", blah blah, */
}
gtk_menu_bar_append (GTK_MENU_BAR(g_menubar), child);
}
return menubar;
}

9
gnome/gnome.TODO Normal file
View File

@ -0,0 +1,9 @@
- Drop targets on the desktop.
- Sync the screen panels with the real panels
- Use containers instead of WPanels as the toplevel window displayed
- widgets event forwarding in WInputs and WPanels.
- Split view.
- Menu organization
- Intenrationalization
- All of the dialogs.

765
gnome/gscreen.c Normal file
View File

@ -0,0 +1,765 @@
/* GNU Midnight Commander -- GNOME edition
*
* Directory display routines
*
* Copyright (C) 1997 The Free Software Foundation
*
* Author: Miguel de Icaza
*/
#include <config.h>
#include <string.h>
#include <stdlib.h> /* atoi */
#include "fs.h"
#include "x.h"
#include "dir.h"
#include "panel.h"
#include "command.h"
#include "panel.h" /* current_panel */
#include "command.h" /* cmdline */
#include "main.h"
#include "color.h"
#include "mouse.h"
#include "layout.h" /* get_panel_widget */
#include "ext.h" /* regex_command */
#include "cmd.h" /* copy_cmd, ren_cmd, delete_cmd, ... */
#include "gscreen.h"
#include "dir.h"
#include "dialog.h"
#include "directory.xpm"
/* This is used to initialize our pixmaps */
static int pixmaps_ready;
GdkPixmap *directory_pixmap;
GdkBitmap *directory_mask;
/* button bindings, mc text mode (1) or gui-like */
static int mc_bindings;
void
repaint_file (WPanel *panel, int file_index, int move, int attr, int isstatus)
{
}
void
show_dir (WPanel *panel)
{
g_panel_contents *g = (g_panel_contents *) panel->widget.wdata;
GList *list;
char *string;
list = g_list_alloc ();
g_list_append (list, panel->cwd);
printf ("show_dir to %s %s\n", panel->cwd, panel->filter ? panel->filter : "<no-filt>");
}
static void
panel_file_list_set_type_bitmap (GtkCList *cl, int row, int column, int color, file_entry *fe)
{
/* Here, add more icons */
switch (color){
case DIRECTORY_COLOR:
gtk_clist_set_pixmap (cl, row, column, directory_pixmap, directory_mask);
break;
}
}
static void
panel_file_list_set_row_colors (GtkCList *cl, int row, int color_pair)
{
if (gmc_color_pairs [color_pair].fore)
gtk_clist_set_foreground (cl, row, gmc_color_pairs [color_pair].fore);
if (gmc_color_pairs [color_pair].back)
gtk_clist_set_background (cl, row, gmc_color_pairs [color_pair].back);
}
void
x_fill_panel (WPanel *panel)
{
g_panel_contents *g = (g_panel_contents *) panel->widget.wdata;
const int top = panel->count;
const int items = panel->format->items;
GtkCList *cl = GTK_CLIST (g->list);
int i, col, type_col, color;
char **texts;
texts = malloc (sizeof (char *) * items);
gtk_clist_freeze (GTK_CLIST (cl));
gtk_clist_clear (GTK_CLIST (cl));
/* which column holds the type information */
type_col = -1;
for (i = 0; i < top; i++){
file_entry *fe = &panel->dir.list [i];
format_e *format = panel->format;
for (col = 0; format; format = format->next){
char *text;
if (!format->use_in_gui)
continue;
if (type_col == -1)
if (strcmp (format->id, "type") == 0)
type_col = col;
if (!format->string_fn)
texts [col] = "";
else
texts [col] = (*format->string_fn)(fe, 10);
col++;
}
gtk_clist_append (cl, texts);
color = file_entry_color (fe);
panel_file_list_set_row_colors (cl, i, color);
if (type_col != -1)
panel_file_list_set_type_bitmap (cl, i, type_col, color, fe);
}
gtk_clist_thaw (GTK_CLIST (cl));
free (texts);
}
void
gmc_panel_set_size (int index, int boot)
{
Widget *w;
WPanel *p;
w = (Widget *) get_panel_widget (index);
p = (WPanel *) w;
w->cols = 40;
w->lines = 25;
set_panel_formats (p);
paint_panel (p);
if (!boot)
paint_frame (p);
x_fill_panel (p);
}
void
x_panel_set_size (int index)
{
printf ("WARNING: set size called\n");
gmc_panel_set_size (index, 1);
}
void
x_panel_select_item (WPanel *panel, int index, int value)
{
/* Not required */
}
void
x_select_item (WPanel *panel)
{
g_panel_contents *g = (g_panel_contents *) panel->widget.wdata;
GtkCList *clist = GTK_CLIST (g->list);
gtk_clist_select_row (clist, panel->selected, 0);
if (!gtk_clist_row_isvisable (clist, panel->selected)){
gtk_clist_moveto (clist, panel->selected, 0, 0.5, 0.0);
}
}
void
x_unselect_item (WPanel *panel)
{
#if 0
g_panel_contents *g = (g_panel_contents *) panel->widget.wdata;
gtk_clist_unselect_row (GTK_CLIST (g->list), panel->selected, 0);
#endif
}
void
x_filter_changed (WPanel *panel)
{
g_panel_contents *g = (g_panel_contents *) panel->widget.wdata;
if (panel->filter){
char *string;
string = g_copy_strings ("Filter: ", panel->filter, NULL);
gtk_label_set (GTK_LABEL (g->filter), string);
g_free (string);
} else
gtk_label_set (GTK_LABEL (g->filter), "No filter");
}
void
x_adjust_top_file (WPanel *panel)
{
g_panel_contents *g = (g_panel_contents *) panel->widget.wdata;
gtk_clist_moveto (GTK_CLIST (g->list), panel->top_file, 0, 0.0, 0.0);
panel->top_file;
}
#define COLUMN_INSET 3
#define CELL_SPACING 1
GtkWidget
panel_file_list_configure_contents (GtkWidget *file_list, WPanel *panel, int main_width, int height)
{
format_e *format = panel->format;
int i, used_columns, expandables, items;
int char_width, usable_pixels, extra_pixels, width;
int total_columns, extra_columns;
int expand_space, extra_space, shrink_space;
int lost_pixels;
/* Pass 1: Count minimum columns,
* set field_len to default to the requested_field_len
* and compute how much space we lost to the column decorations
*/
lost_pixels = used_columns = expandables = items = 0;
for (format = panel->format; format; format = format->next){
format->field_len = format->requested_field_len;
if (!format->use_in_gui)
continue;
used_columns += format->field_len;
items++;
if (format->expand)
expandables++;
lost_pixels += CELL_SPACING + (2 * COLUMN_INSET);
}
/* The left scrollbar might take some space from us, use this information */
if (GTK_WIDGET_VISIBLE (GTK_CLIST (file_list)->vscrollbar)){
int scrollbar_width = GTK_WIDGET (GTK_CLIST (file_list)->vscrollbar)->requisition.width;
int scrollbar_space = GTK_CLIST_CLASS (GTK_OBJECT (file_list)->klass)->scrollbar_spacing;
lost_pixels += scrollbar_space + scrollbar_width;
}
char_width = gdk_string_width (file_list->style->font, "xW") / 2;
width = main_width - lost_pixels;
extra_pixels = width % char_width;
usable_pixels = width - extra_pixels;
total_columns = usable_pixels / char_width;
extra_columns = total_columns - used_columns;
if (extra_columns > 0){
expand_space = extra_columns / expandables;
extra_space = extra_columns % expandables;
} else
extra_space = expand_space = 0;
/* If we dont have enough space, shorten the fields */
if (used_columns > total_columns){
expand_space = 0;
shrink_space = (used_columns - total_columns) / items;
} else
shrink_space = 0;
gtk_clist_freeze (GTK_CLIST (file_list));
for (i = 0, format = panel->format; format; format = format->next){
if (!format->use_in_gui)
continue;
format->field_len += (format->expand ? expand_space : 0) - shrink_space;
gtk_clist_set_column_width (GTK_CLIST (file_list), i, format->field_len * char_width);
i++;
}
gtk_clist_thaw (GTK_CLIST (file_list));
}
static void
internal_select_item (GtkWidget *file_list, WPanel *panel, int row)
{
if (panel->selected == row)
return;
gtk_signal_handler_block_by_data (GTK_OBJECT (file_list), panel);
unselect_item (panel);
panel->selected = row;
select_item (panel);
gtk_signal_handler_unblock_by_data (GTK_OBJECT (file_list), panel);
}
void
panel_file_list_select_row (GtkWidget *file_list, int row, int column, GdkEvent *event, WPanel *panel)
{
if (!event){
internal_select_item (file_list, panel, row);
return;
}
if (event->type == GDK_BUTTON_PRESS)
internal_select_item (file_list, panel, row);
if (event->type == GDK_2BUTTON_PRESS){
do_enter (panel);
}
}
/* Figure out the number of visible lines in the panel */
static void
panel_file_list_compute_lines (GtkCList *file_list, WPanel *panel, int height)
{
int lost_pixels = 0;
if (GTK_WIDGET_VISIBLE (file_list->hscrollbar)){
int scrollbar_width = GTK_WIDGET (file_list->hscrollbar)->requisition.width;
int scrollbar_space = GTK_CLIST_CLASS (GTK_OBJECT (file_list)->klass)->scrollbar_spacing;
lost_pixels = scrollbar_space + scrollbar_width;
}
panel->widget.lines = (height-lost_pixels) /
(GTK_CLIST (file_list)->row_height + CELL_SPACING);
}
static void
panel_file_list_size_allocate_hook (GtkWidget *file_list, GtkAllocation *allocation, WPanel *panel)
{
panel_file_list_configure_contents (file_list, panel, allocation->width, allocation->height);
/* Set the selection callback */
gtk_signal_connect (GTK_OBJECT (file_list), "select_row",
GTK_SIGNAL_FUNC (panel_file_list_select_row), panel);
panel_file_list_compute_lines (GTK_CLIST (file_list), panel, allocation->height);
}
static void
panel_file_list_column_callback (GtkWidget *widget, int col, WPanel *panel)
{
format_e *format;
int i;
for (i = 0, format = panel->format; format; format = format->next){
if (!format->use_in_gui)
continue;
if (i == col){
sortfn *sorting_routine;
sorting_routine = get_sort_fn (format->id);
if (!sorting_routine)
return;
if (sorting_routine == panel->sort_type)
panel->reverse = !panel->reverse;
panel->sort_type = sorting_routine;
do_re_sort (panel);
return;
}
i++;
}
}
void
panel_create_pixmaps (GtkWidget *parent)
{
GdkColor color = gtk_widget_get_style (parent)->bg [GTK_STATE_NORMAL];
pixmaps_ready = 1;
directory_pixmap = gdk_pixmap_create_from_xpm_d (parent->window, &directory_mask, &color, directory_xpm);
}
static void
panel_file_list_scrolled (GtkAdjustment *adj, WPanel *panel)
{
if (!GTK_IS_ADJUSTMENT (adj)){
fprintf (stderr, "CRAP!\n");
exit (1);
}
}
void
panel_configure_file_list (WPanel *panel, GtkWidget *file_list)
{
format_e *format = panel->format;
GtkCList *cl = GTK_CLIST (file_list);
GtkObject *adjustment;
int i;
/* Set sorting callback */
gtk_signal_connect (GTK_OBJECT (file_list), "click_column",
GTK_SIGNAL_FUNC (panel_file_list_column_callback), panel);
/* Configure the CList */
gtk_clist_set_selection_mode (cl, GTK_SELECTION_BROWSE);
gtk_clist_set_policy (cl, GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
for (i = 0, format = panel->format; format; format = format->next){
GtkJustification just;
if (!format->use_in_gui)
continue;
/* Set desired justification */
if (format->just_mode == J_LEFT)
just = GTK_JUSTIFY_LEFT;
else
just = GTK_JUSTIFY_RIGHT;
gtk_clist_set_column_justification (cl, i, just);
i++;
}
/* Configure the scrolbars */
adjustment = GTK_OBJECT (gtk_range_get_adjustment (GTK_RANGE (cl->vscrollbar)));
gtk_signal_connect_after (GTK_OBJECT(adjustment), "value_changed",
GTK_SIGNAL_FUNC (panel_file_list_scrolled), panel);
}
void
panel_list_mc_bindings (GtkWidget *file_list, int row, int col, GdkEvent *event, WPanel *panel)
{
}
void
panel_action_open (GtkWidget *widget, WPanel *panel)
{
do_enter (panel);
}
void
panel_action_open_with (GtkWidget *widget, WPanel *panel)
{
char *command;
command = input_expand_dialog (" Open with...", "Enter extra arguments:", panel->dir.list [panel->selected].fname);
execute (command);
free (command);
}
void
panel_action_view (GtkWidget *widget, WPanel *panel)
{
view_cmd (panel);
}
void
panel_action_view_unfiltered (GtkWidget *widget, WPanel *panel)
{
view_simple_cmd (panel);
}
void
panel_action_copy (GtkWidget *widget, WPanel *panel)
{
}
void
panel_action_rename (GtkWidget *widget, WPanel *panel)
{
}
void
panel_action_delete (GtkWidget *widget, WPanel *panel)
{
}
typedef void (*context_menu_callback)(GtkWidget *, WPanel *);
struct {
char *text;
context_menu_callback callback;
} file_actions [] = {
{ "Info", NULL },
{ "", NULL },
{ "Open", panel_action_open },
{ "Open with", panel_action_open_with },
{ "View", panel_action_view },
{ "View unfiltered", panel_action_view_unfiltered },
{ "", NULL },
{ "Copy...", (context_menu_callback) copy_cmd },
{ "Rename/move..", (context_menu_callback) ren_cmd },
{ "Delete...", (context_menu_callback) delete_cmd },
{ NULL, NULL },
};
GtkWidget *
create_popup_submenu (WPanel *panel, char *filename)
{
static int submenu_translated;
GtkWidget *menu;
int i;
if (!submenu_translated){
/* FIXME translate it */
submenu_translated = 1;
}
menu = gtk_menu_new ();
for (i = 0; file_actions [i].text; i++){
GtkWidget *item;
if (*file_actions [i].text)
item = gtk_menu_item_new_with_label (file_actions [i].text);
else
item = gtk_menu_item_new ();
gtk_widget_show (item);
if (file_actions [i].callback){
gtk_signal_connect (GTK_OBJECT (item), "activate",
GTK_SIGNAL_FUNC(file_actions [i].callback), panel);
}
gtk_menu_append (GTK_MENU (menu), item);
}
return menu;
}
/*
* Ok, this activates a menu popup action for a filename
* it is kind of hackish, it gets the desired action from the
* item, so it has to peek inside the item to retrieve the label
*/
static void
popup_activate_by_string (GtkMenuItem *item, WPanel *panel)
{
char *filename = panel->dir.list [panel->selected].fname;
char *action;
int movedir;
g_return_if_fail (GTK_IS_MENU_ITEM (item));
g_return_if_fail (GTK_IS_LABEL (GTK_BIN (item)->child));
action = GTK_LABEL (GTK_BIN (item)->child)->label;
regex_command (filename, action, NULL, &movedir);
}
static void
file_popup_add_context (GtkMenu *menu, WPanel *panel, char *filename)
{
GtkWidget *item;
char *p, *q;
int c;
p = regex_command (filename, NULL, NULL, NULL);
if (!p)
return;
item = gtk_menu_item_new ();
gtk_widget_show (item);
gtk_menu_append (menu, item);
for (;;){
while (*p == ' ' || *p == '\t')
p++;
if (!*p)
break;
q = p;
while (*q && *q != '=' && *q != '\t')
q++;
c = *q;
*q = 0;
item = gtk_menu_item_new_with_label (p);
gtk_widget_show (item);
gtk_signal_connect (GTK_OBJECT(item), "activate",
GTK_SIGNAL_FUNC(popup_activate_by_string), panel);
gtk_menu_append (menu, item);
if (!c)
break;
p = q + 1;
}
}
static void
file_popup (GdkEvent *event, WPanel *panel, char *filename)
{
GtkWidget *menu = gtk_menu_new ();
GtkWidget *submenu;
GtkWidget *item;
item = gtk_menu_item_new_with_label (filename);
gtk_widget_show (item);
gtk_menu_append (GTK_MENU (menu), item);
submenu = create_popup_submenu (panel, filename);
gtk_menu_item_set_submenu (GTK_MENU_ITEM (item), submenu);
file_popup_add_context (GTK_MENU (menu), panel, filename);
gtk_menu_popup (GTK_MENU (menu), NULL, NULL, NULL, NULL, 3, event->button.time);
gtk_widget_show (menu);
}
void
panel_list_new_bindings (GtkWidget *file_list, int row, int col, GdkEvent *event, WPanel *panel)
{
char *filename = panel->dir.list [row].fname;
unselect_item (panel);
panel->selected = row;
select_item (panel);
if (event->button.button == 3){
file_popup (event, panel, filename);
}
}
void
panel_file_list_row_selected (GtkWidget *file_list, int row, int col, GdkEvent *event, WPanel *panel)
{
if (!event)
return;
if (mc_bindings)
panel_list_mc_bindings (file_list, row, col, event, panel);
else
panel_list_new_bindings (file_list, row, col, event, panel);
}
GtkWidget *
panel_create_file_list (WPanel *panel)
{
const int items = panel->format->items;
format_e *format = panel->format;
GtkWidget *file_list;
gchar **titles;
int i;
titles = g_new (char *, items);
for (i = 0; i < items; format = format->next)
if (format->use_in_gui)
titles [i++] = format->title;
file_list = gtk_clist_new_with_titles (items, titles);
panel_configure_file_list (panel, file_list);
free (titles);
gtk_signal_connect (GTK_OBJECT (file_list),
"size_allocate",
GTK_SIGNAL_FUNC (panel_file_list_size_allocate_hook),
panel);
gtk_signal_connect (GTK_OBJECT (file_list),
"select_row",
GTK_SIGNAL_FUNC (panel_file_list_row_selected),
panel);
return file_list;
}
GtkWidget *
panel_create_cwd (WPanel *panel)
{
GtkWidget *option_menu;
option_menu = gtk_combo_new ();
return option_menu;
}
void
panel_change_filter (GtkWidget *button, WPanel *panel)
{
fprintf (stderr, "Change filter: not yet hooked\n");
}
GtkWidget *
panel_create_filter (WPanel *panel, GtkWidget **label)
{
GtkWidget *filter;
*label = gtk_label_new ("");
gtk_widget_show (*label);
filter = gtk_button_new ();
gtk_container_add (GTK_CONTAINER (filter), *label);
gtk_signal_connect (GTK_OBJECT (filter), "clicked", GTK_SIGNAL_FUNC (panel_change_filter), panel);
return filter;
}
void
x_create_panel (Dlg_head *h, widget_data parent, WPanel *panel)
{
g_panel_contents *g = g_new (g_panel_contents, 1);
GtkWidget *table, *status_line, *filter_w, *statusbar;
g->table = gtk_table_new (2, 1, 0);
gtk_widget_show (g->table);
g->list = panel_create_file_list (panel);
gtk_widget_show (g->list);
g->current_dir = panel_create_cwd (panel);
gtk_widget_show (g->current_dir);
filter_w = panel_create_filter (panel, &g->filter);
gtk_widget_show (filter_w);
status_line = gtk_hbox_new (0, 0);
gtk_widget_show (status_line);
gtk_box_pack_start (GTK_BOX (status_line), g->current_dir, 0, 0, 0);
gtk_box_pack_end (GTK_BOX (status_line), filter_w, 0, 0, 0);
g->status = statusbar = gtk_label_new ("");
gtk_widget_show (statusbar);
gtk_table_attach (GTK_TABLE (g->table), g->list, 0, 1, 1, 2,
GTK_EXPAND | GTK_FILL | GTK_SHRINK,
GTK_EXPAND | GTK_FILL | GTK_SHRINK,
0, 0);
gtk_table_attach (GTK_TABLE (g->table), status_line, 0, 1, 0, 1,
GTK_EXPAND | GTK_FILL, GTK_SHRINK, 0, 0);
gtk_table_attach (GTK_TABLE (g->table), statusbar, 0, 1, 2, 3,
GTK_EXPAND | GTK_FILL | GTK_SHRINK,
0, 0, 0);
gtk_widget_show (g->table);
panel->widget.wdata = (widget_data) g;
/* Now, insert our table in our parent */
gtk_container_add (GTK_CONTAINER (gtk_object_get_data (GTK_OBJECT (h->wdata), "parent-container")),
g->table);
if (!pixmaps_ready){
if (!GTK_WIDGET_REALIZED (g->list))
gtk_widget_realize (g->list);
panel_create_pixmaps (g->list);
}
}
void
panel_update_cols (Widget *panel, int frame_size)
{
panel->cols = 60;
panel->lines = 20;
}
char *get_nth_panel_name (int num)
{
static char buffer [20];
if (!num)
return "New Left Panel";
else if (num == 1)
return "New Right Panel";
else {
sprintf (buffer, "%ith Panel", num);
return buffer;
}
}
void
load_hint (void)
{
char *hint;
if ((hint = get_random_hint ())){
if (*hint)
set_hintbar (hint);
free (hint);
} else
set_hintbar ("The GNOME Midnight Commander " VERSION " (C) 1995-1998 the FSF");
}
void
paint_frame (WPanel *panel)
{
}

20
gnome/gscreen.h Normal file
View File

@ -0,0 +1,20 @@
#ifndef __GSCREEN_H
#define __GSCREEN_H
void x_panel_set_size (int index);
void x_create_panel (Dlg_head *h, widget_data parent, WPanel *panel);
void x_adjust_top_file (WPanel *panel);
void x_filter_changed (WPanel *panel);
void x_add_sort_label (WPanel *panel, int index, char *text, char *tag, void *sr);
void x_sort_label_start (WPanel *panel);
void x_reset_sort_labels (WPanel *panel);
typedef struct {
GtkWidget *table;
GtkWidget *list;
GtkWidget *current_dir;
GtkWidget *filter;
GtkWidget *status;
} g_panel_contents;
#endif /* __GSCREEN_H */

198
gnome/gtools.c Normal file
View File

@ -0,0 +1,198 @@
#include "util.h"
#include <gnome.h>
#include <gdk/gdkkeysyms.h>
#include "myslang.h"
#include "dlg.h"
#undef HAVE_LIBGPM
#include "mouse.h"
#include "key.h"
#include "widget.h"
#include "wtools.h"
#include "dialog.h"
static int sel_pos;
void query_set_sel (int new_sel)
{
sel_pos = new_sel;
}
int query_dialog (char *header, char *text, int flags, int count, ...)
{
va_list ap;
GtkDialog *dialog;
GtkWidget *label, *focus_widget;
int i;
va_start (ap, count);
dialog = GTK_DIALOG (gtk_dialog_new ());
label = gtk_label_new (text);
gtk_widget_show (label);
if (flags & D_ERROR)
fprintf (stderr, "Messagebox: this should be displayed like an error\n");
gtk_container_add (GTK_CONTAINER (dialog->vbox), label);
gtk_container_border_width (GTK_CONTAINER (dialog->vbox), 5);
for (i = 0; i < count; i++){
GtkWidget *button;
char *cur_name = va_arg (ap, char *);
button = gtk_button_new_with_label (cur_name);
gtk_widget_show (button);
gtk_box_pack_start_defaults (GTK_BOX (GTK_DIALOG (dialog)->action_area), button);
if (i == sel_pos){
focus_widget = button;
}
}
if (focus_widget)
gtk_widget_grab_focus (focus_widget);
gtk_widget_show (GTK_WIDGET (dialog));
gtk_grab_add (GTK_WIDGET (dialog));
gtk_main ();
gtk_grab_remove (GTK_WIDGET (dialog));
sel_pos = 0;
}
/* To show nice messages to the users */
Dlg_head *message (int error, char *header, char *text, ...)
{
va_list args;
char buffer [4096];
Dlg_head *d;
/* Setup the display information */
strcpy (buffer, "\n");
va_start (args, text);
vsprintf (&buffer [1], text, args);
strcat (buffer, "\n");
va_end (args);
query_dialog (header, buffer, error, 1, "&Ok");
}
int
translate_gdk_keysym_to_curses (GdkEventKey *event)
{
int keyval = event->keyval;
switch (keyval){
case GDK_BackSpace:
return KEY_BACKSPACE;
case GDK_Tab:
return '\t';
case GDK_KP_Enter:
case GDK_Return:
return '\n';
case GDK_Escape:
return 27;
case GDK_Delete:
case GDK_KP_Delete:
return KEY_DC;
case GDK_KP_Home:
case GDK_Home:
return KEY_HOME;
case GDK_KP_End:
case GDK_End:
return KEY_END;
case GDK_KP_Left:
case GDK_Left:
return KEY_LEFT;
case GDK_KP_Right:
case GDK_Right:
return KEY_RIGHT;
case GDK_KP_Up:
case GDK_Up:
return KEY_UP;
case GDK_KP_Down:
case GDK_Down:
return KEY_DOWN;
case GDK_KP_Page_Up:
case GDK_Page_Up:
return KEY_PPAGE;
case GDK_KP_Page_Down:
case GDK_Page_Down:
return KEY_NPAGE;
case GDK_KP_Insert:
case GDK_Insert:
return KEY_IC;
case GDK_Menu:
return KEY_F(9);
case GDK_F1:
return KEY_F(1);
case GDK_F2:
return KEY_F(2);
case GDK_F3:
return KEY_F(3);
case GDK_F4:
return KEY_F(4);
case GDK_F5:
return KEY_F(5);
case GDK_F6:
return KEY_F(6);
case GDK_F7:
return KEY_F(7);
case GDK_F8:
return KEY_F(8);
case GDK_F9:
return KEY_F(9);
case GDK_F10:
return KEY_F(10);
case GDK_F11:
return KEY_F(11);
case GDK_F12:
return KEY_F(12);
case GDK_F13:
return KEY_F(13);
case GDK_F14:
return KEY_F(14);
case GDK_F15:
return KEY_F(15);
case GDK_F16:
return KEY_F(16);
case GDK_F17:
return KEY_F(17);
case GDK_F18:
return KEY_F(18);
case GDK_F19:
return KEY_F(19);
case GDK_F20:
return KEY_F(20);
/* The keys we ignore */
case GDK_Control_L:
case GDK_Control_R:
case GDK_Meta_L:
case GDK_Meta_R:
case GDK_Alt_L:
case GDK_Alt_R:
case GDK_Shift_L:
case GDK_Shift_R:
return -1;
default:
if ((event->keyval >= 0x20) && (event->keyval <= 0xff)){
int key = event->keyval;
if (event->state & GDK_CONTROL_MASK){
return key - 'a' + 1;
}
if (event->state & GDK_MOD1_MASK){
return ALT (key);
}
return key;
}
}
}

221
gnome/gwidget.c Normal file
View File

@ -0,0 +1,221 @@
/*
* Widgets for the GNOME edition of the Midnight Commander
*
* Copyright (C) 1997 The Free Software Foundation
*
* Author: Miguel de Icaza (miguel@gnu.org)
*
*/
#include <config.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
#include "x.h"
#include "gwidget.h"
#include "dlg.h"
void
x_destroy_cmd (void *w)
{
Widget *widget = (Widget *) w;
if (!widget->wdata)
return;
gtk_widget_destroy (GTK_WIDGET(widget->wdata));
}
/* Buttons */
static void
gbutton_callback (GtkWidget *w, void *data)
{
WButton *b = data;
Dlg_head *h = (Dlg_head *) b->widget.parent;
int stop = 0;
if (1)
return;
if (b->callback)
stop = (*b->callback)(b->action, b->callback_data);
if (!b->callback || stop){
h->running = 0;
h->ret_value = b->action;
gtk_main_quit ();
}
}
int
x_create_button (Dlg_head *h, widget_data parent, WButton *b)
{
GtkWidget *button;
button = gtk_button_new_with_label (b->text);
gtk_widget_show (button);
gtk_signal_connect (GTK_OBJECT(button), "clicked", (GtkSignalFunc) gbutton_callback, b);
b->widget.wdata = (widget_data) button;
return 1;
}
static void
x_set_text (GtkWidget *w, gpointer data)
{
if (!GTK_IS_LABEL (w))
return;
gtk_label_set (GTK_LABEL(w), data);
}
void
x_button_set (WButton *b, char *text)
{
GtkWidget *button = GTK_WIDGET (b->widget.wdata);
gtk_container_foreach (GTK_CONTAINER (button), x_set_text, text);
}
/* Radio buttons */
int
x_create_radio (Dlg_head *h, widget_data parent, WRadio *r)
{
GtkWidget *w, *vbox;
GSList *group;
int i;
vbox = gtk_vbox_new (0, 0);
for (i = 0; i < r->count; i++){
if (i == 0){
w = gtk_radio_button_new_with_label (NULL, r->texts [i]);
group = gtk_radio_button_group (GTK_RADIO_BUTTON (w));
} else {
w = gtk_radio_button_new_with_label (group, r->texts [i]);
}
gtk_box_pack_start_defaults (GTK_BOX (vbox), w);
gtk_widget_show (w);
}
gtk_widget_show (vbox);
r->widget.wdata = (widget_data) vbox;
return 1;
}
/* Check buttons */
int
x_create_check (Dlg_head *h, widget_data parent, WCheck *c)
{
GtkWidget *w;
int i;
w = gtk_check_button_new_with_label (c->text);
gtk_widget_show (w);
c->widget.wdata = (widget_data) w;
return 1;
}
/* Input lines */
int
x_create_input (Dlg_head *h, widget_data parent, WInput *in)
{
GtkWidget *entry;
entry = gtk_entry_new ();
gtk_widget_show (entry);
in->widget.wdata = (widget_data) entry;
gtk_entry_set_text (GTK_ENTRY (entry), in->buffer);
return 1;
}
void
x_update_input (WInput *in)
{
gtk_entry_set_text (GTK_ENTRY (in->widget.wdata), in->buffer);
GTK_ENTRY (in->widget.wdata)->current_pos = in->point;
}
/* Listboxes */
void
x_listbox_select_nth (WListbox *l, int nth)
{
}
void
x_listbox_delete_nth (WListbox *l, int nth)
{
}
int
x_create_listbox (Dlg_head *h, widget_data parent, WListbox *l)
{
GtkWidget *listbox;
listbox = gtk_clist_new (1);
gtk_widget_show (listbox);
l->widget.wdata = (widget_data) listbox;
return 1;
}
void
x_list_insert (WListbox *l, WLEntry *p, WLEntry *e)
{
}
/* Labels */
int
x_create_label (Dlg_head *g, widget_data parent, WLabel *l)
{
GtkWidget *label;
label = gtk_label_new (l->text);
gtk_widget_show (label);
l->widget.wdata = (widget_data) label;
return 1;
}
void
x_label_set_text (WLabel *label, char *text)
{
gtk_label_set (GTK_LABEL (label->widget.wdata), text);
}
/* Buttonbar */
int
x_create_buttonbar (Dlg_head *h, widget_data parent, WButtonBar *bb)
{
}
void
x_redefine_label (WButtonBar *bb, int idx)
{
}
int
x_find_buttonbar_check (WButtonBar *bb, Widget *paneletc)
{
}
/* Gauges */
int
x_create_gauge (Dlg_head *h, widget_data parent, WGauge *g)
{
GtkWidget *pbar;
pbar = gtk_progress_bar_new ();
g->widget.wdata = (widget_data) pbar;
return 1;
}
void
x_gauge_show (WGauge *g)
{
gtk_widget_show (GTK_WIDGET (g->widget.wdata));
}
void
x_gauge_set_value (WGauge *g, int max, int current)
{
gtk_progress_bar_update (GTK_PROGRESS_BAR (g->widget.wdata), ((gfloat) current / (gfloat) max));
}

13
gnome/gwidget.h Normal file
View File

@ -0,0 +1,13 @@
#ifndef __GWIDGET_H
#define __GWIDGET_H
void x_button_set (WButton *b, char *text);
int x_create_button (Dlg_head *h, widget_data parent, WButton *b);
void x_listbox_select_nth (WListbox *l, int nth);
void x_listbox_delete_nth (WListbox *l, int nth);
void x_label_set_text (WLabel *label, char *text);
int x_create_gauge (Dlg_head *h, widget_data parent, WGauge *g);
void x_gauge_show (WGauge *g);
void x_gauge_set_value (WGauge *g, int max, int current);
#endif /* __GWIDGET_H */

61
icons/Makefile.in Normal file
View File

@ -0,0 +1,61 @@
srcdir = @srcdir@
VPATH = @srcdir@
rootdir = $(srcdir)/..
@MCFG@@MCF@
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
#
# Distribution variables
#
DISTICONS = Makefile.in $(ALLICONS)
ALLICONS = a.xpm application.xpm binary.xpm bitmap.xpm blackhole.xpm \
bug.xpm c.xpm calc.xpm calendar.xpm cc.xpm cdrom.xpm clipboard.xpm \
compressed.xpm core.xpm data.xpm draw.xpm edit.xpm editor.xpm \
emacs.xpm f.xpm fig.xpm font.xpm framemaker.xpm gif.xpm h.xpm \
hidden.xpm hidden_dir.xpm html.xpm index.xpm info.xpm jpeg.xpm \
key_dir.xpm lharc.xpm link.xpm link_bad.xpm link_dir.xpm lock_dir.xpm \
mail.xpm mail_dir.xpm makefile.xpm man.xpm music.xpm network_dir.xpm \
news_dir.xpm no_entry.xpm o.xpm open_dir.xpm p.xpm parent_dir.xpm \
pbm.xpm pgm.xpm plain.xpm plain_dir.xpm postscript.xpm ppm.xpm \
printer.xpm recycle.xpm report.xpm rubbish.xpm s.xpm sc.xpm \
scroll.xpm so.xpm sound.xpm spreadsheet.xpm stop.xpm sys.xpm \
system_dir.xpm tag.xpm tar.xpm taz.xpm tex-view.xpm tex.xpm \
text.xpm tiff.xpm trash.xpm uu.xpm window.xpm wizard.xpm word.xpm \
xbm.xpm xchess.xpm xfig.xpm xman.xpm xmosaic.xpm xpaint.xpm xpm.xpm \
zip.xpm zoo.xpm
all:
install: @insticons@
install_icons:
-for I in $(ALLICONS); \
do $(INSTALL_DATA) $(srcdir)/$$I $(DESTDIR)$(icondir)/$$I; done
uninstall:
-cd $(DESTDIR)$(icondir); $(RMF) $(ALLICONS)
-rmdir $(DESTDIR)$(icondir)
check:
@echo no tests are supplied.
TAGS:
cross:
clean:
realclean:
distclean:
-$(RMF) $(srcdir)/*~ $(srcdir)/Makefile
distcopy:
$(CP) $(DISTICONS) ../../mc-$(VERSION)/icons
depend dep:

42
icons/a.xpm Normal file
View File

@ -0,0 +1,42 @@
/* XPM */
static char * dot[] = {
"32 32 7 1",
", c None s None",
" c white",
". c black",
"X c lemon chiffon",
"o c tan",
"O c gray50",
"+ c slate gray",
",,,,..................,,,,,,,,,,",
",,,,.XXXXXXXXXXXXXXXX..,,,,,,,,,",
",,,,.XXXXXXXXXXXXXXXX.o.,,,,,,,,",
",,,,.XXXXXXXXXXXXXXXX.oo.,,,,,,,",
",,,,.XXO+O+O+O+O+O+OX.ooo.,,,,,,",
",,,,.XX+O+O+O+O+O+O+X.oooo.,,,,,",
",,,,.XXO+O+O+O+O+O+OX.ooooo.,,,,",
",,,,.XX+O+O+O+O+O+O+X.......O,,,",
",,,,.XXO+O+O+O+O+O+OXXooooo.O,,,",
",,,,.XX+O+O+O+O+O+O+O+O+O+o.O,,,",
",,,,.XXO+O+O+O+O+O+O+O+O+OX.O,,,",
",,,,.XX+O+O+O+O+O+O+O+O+O+X.O,,,",
",,,,.XXO+O+O+O+O+O+O+O+O+OX.O,,,",
",,,,.XX+O+O+O+O+O+O+O+O+O+X.O,,,",
",,,,.XXO+O+O+O+O+O+O+O+O+OX.O,,,",
",,,,.XX+O+O+O+O+O+O+O+O+O+X.O,,,",
",,,,.XXO+O+O+O+O+O+O+O+O+OX.O,,,",
",,,,.XX+O+O+O+O+O+O+X+X+O+X.O,,,",
",,,,.XXO+O+O+O+O+OXXXXXX+OX.O,,,",
",,,,.XX+O+O+O+O+XXX....XX+X.O,,,",
",,,,.XXO+O+O+O+OXX......XXX.O,,,",
",,,,.XX+O+O+O+O+X...XX...XX.O,,,",
",,,,.XXO+O+O+O+OXXXXXX...XX.O,,,",
",,,,.XX+O+O+O+O+XX.......XX.O,,,",
",,,,.XXO+O+O+O+OX....X...XX.O,,,",
",,,,.XX+O+O+OXXXX...XX...XX.O,,,",
",,,,.XXO+O+O+X..X...X....XX.O,,,",
",,,,.XXXXXXXXX..X........XX.O,,,",
",,,,.XXXXXXXXX..XX....X..XX.O,,,",
",,,,.XXXXXXXXXXXXXXXXXXXXXX.O,,,",
",,,,........................O,,,",
",,,,,OOOOOOOOOOOOOOOOOOOOOOOO,,,"};

43
icons/application.xpm Normal file
View File

@ -0,0 +1,43 @@
/* XPM */
static char * application[] = {
"32 32 8 1",
", c None s None",
" c white",
". c black",
"X c lemon chiffon",
"o c tan",
"O c gray50",
"+ c tomato",
"@ c wheat",
",,,,..................,,,,,,,,,,",
",,,,.XXXXXXXXXXXXXXXX..,,,,,,,,,",
",,,,.XXXXXXXXXXXXXXXX.o.,,,,,,,,",
",,,,.XXXXXXXXXXXXXXXX.oo.,,,,,,,",
",,,,.XXXXXXXXXXXXXXXX.ooo.,,,,,,",
",,,,.XXXXXXXXXXXXXXXX.oooo.,,,,,",
",,,,.XXXXXXXXXXXXXXXX.ooooo.,,,,",
",,,,.XXXXXXXXXXXXXXXX.......O,,,",
",,,,.XXXXXXXXXXXXXXXXXXoooo.O,,,",
",,,,.XX..................oo.O,,,",
",,,,.XX.+..+++++++++++++.OX.O,,,",
",,,,.XX.+..+++++++++++++.OX.O,,,",
",,,,.XX..................OX.O,,,",
",,,,.XX.@@@@@@@@@@@@@@@@.OX.O,,,",
",,,,.XX.@@@@@@@@@@@@@@@@.OX.O,,,",
",,,,.XX.@@@@@@@@@@@@@@@@.OX.O,,,",
",,,,.XX.@@@@@@@@@@@@@@@@.OX.O,,,",
",,,,.XX.@@@@@@@@@@@@@@@@.OX.O,,,",
",,,,.XX.@@@@@@@@@@@@@@@@.OX.O,,,",
",,,,.XX.@@@@@@@@@@@@@@@@.OX.O,,,",
",,,,.XX.@@@@@@@@@@@@@@@@.OX.O,,,",
",,,,.XX.@@@@@@@@@@@@@@@@.OX.O,,,",
",,,,.XX.@@@@@@@@@@@@@@@@.OX.O,,,",
",,,,.XX.@@@@@@@@@@@@@@@@.OX.O,,,",
",,,,.XX.@@@@@@@@@@@@@@@@.OX.O,,,",
",,,,.XX..................OX.O,,,",
",,,,.XXXOOOOOOOOOOOOOOOOOOX.O,,,",
",,,,.XXXXXXXXXXXXXXXXXXXXXX.O,,,",
",,,,.XXXXXXXXXXXXXXXXXXXXXX.O,,,",
",,,,.XXXXXXXXXXXXXXXXXXXXXX.O,,,",
",,,,........................O,,,",
",,,,,OOOOOOOOOOOOOOOOOOOOOOOO,,,"};

42
icons/binary.xpm Normal file
View File

@ -0,0 +1,42 @@
/* XPM */
static char * binary[] = {
"32 32 7 1",
" c None s None",
"` c black",
"a c tan",
"b c dodger blue",
"c c gray50",
"d c white",
"e c lemon chiffon",
" `````````````````` ",
" `eeeeeeeeeeeeeeee`` ",
" `eeeeeeeeeeeeeeee`a` ",
" `eeeeeeeeeeeeeeee`aa` ",
" `eeeeeeeeeeeeeeee`aaa` ",
" `eeeeeeeeeeeeeeee`aaaa` ",
" `eeeeeeeeeeeeeeee``````` ",
" `eeeeeeeeeeeeeeeeeaaaaa`c ",
" `eeeebbeeeebeeeebeeaaaa`c ",
" `eeebeebeebbeeebbeeeeee`c ",
" `eeebeebeeebeeeebeeeeee`c ",
" `eeeebbeeebbbeebbbeeeee`c ",
" `eeeeeeeeeeeeeeeeeeeeee`c ",
" `eeeeeeeeeeeeeeeeeeeeee`c ",
" `eeeebeeeebbeeeebbeeeee`c ",
" `eeebbeeebeebeebeebeeee`c ",
" `eeeebeeebeebeebeebeeee`c ",
" `eeebbbeeebbeeeebbeeeee`c ",
" `eeeeeeeeeeeeeeeeeeeeee`c ",
" `eeeeeeeeeeeeeeeeeeeeee`c ",
" `eeeebbeeeebeeeebbeeeee`c ",
" `eeebeebeebbeeebeebeeee`c ",
" `eeebeebeeebeeebeebeeee`c ",
" `eeeebbeeebbbeeebbeeeee`c ",
" `eeeeeeeeeeeeeeeeeeeeee`c ",
" `eeeeeeeeeeeeeeeeeeeeee`c ",
" `eeeeeeeeeeeeeeeeeeeeee`c ",
" `eeeeeeeeeeeeeeeeeeeeee`c ",
" `eeeeeeeeeeeeeeeeeeeeee`c ",
" `eeeeeeeeeeeeeeeeeeeeee`c ",
" ````````````````````````c ",
" cccccccccccccccccccccccc "};

57
icons/bitmap.xpm Normal file
View File

@ -0,0 +1,57 @@
/* XPM */
static char * bitmap_xpm[] = {
/* width height ncolors chars_per_pixel */
"48 48 3 1",
/* colors */
" s None c None",
". c black",
"X c white",
/* pixels */
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ............................... ",
" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXX.. ",
" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXX.. ",
" ................................ ",
" .XX.XXXX.XXXX.XXXX.XXXX.XXXX.X.. ",
" .XX.XXXX.XXXX.XXXX.XXXX.XXXX.X.. ",
" .XX.XXXX.XXXX.XXXX.XXXX.XXXX.X.. ",
" .XX.XXXX.XXXX.XXXX.XXXX.XXXX.X.. ",
" ................................ ",
" .XX.XXXX......XXXX.XXXX.XXXX.X.. ",
" .XX.XXXX......XXXX.XXXX.XXXX.X.. ",
" .XX.XXXX......XXXX.XXXX.XXXX.X.. ",
" .XX.XXXX......XXXX.XXXX.XXXX.X.. ",
" ................................ ",
" .XX.XXXX.XXXX......XXXX......X.. ",
" .XX.XXXX.XXXX......XXXX......X.. ",
" .XX.XXXX.XXXX......XXXX......X.. ",
" .XX.XXXX.XXXX......XXXX......X.. ",
" ................................ ",
" .XX......XXXX.XXXX.XXXX.XXXX.X.. ",
" .XX......XXXX.XXXX.XXXX.XXXX.X.. ",
" .XX......XXXX.XXXX.XXXX.XXXX.X.. ",
" .XX......XXXX.XXXX.XXXX.XXXX.X.. ",
" ................................ ",
" .XX.XXXX.XXXX.XXXX.XXXX.XXXX.X.. ",
" .XX.XXXX.XXXX.XXXX.XXXX.XXXX.X.. ",
" .XX.XXXX.XXXX.XXXX.XXXX.XXXX.X.. ",
" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXX.. ",
" ................................ ",
" ............................... ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" "};

40
icons/blackhole.xpm Normal file
View File

@ -0,0 +1,40 @@
/* XPM */
static char *blackhole_xpm[] = {
"32 32 5 1",
" s none c none",
". c black",
"X c white",
"o c gray",
"O c black",
" ................... ",
" .XXXXXXXXXXXXXXXXX.. ",
" .XXXXXXXXXXXXXXXXX.o. ",
" .XXXXXXXXXXXXXXXXX.oo. ",
" .XXXXXXXXXXXXXXXXX.ooo. ",
" .XXXXXXXXXXXXXXXXX.oooo. ",
" .XXXXXXXXXXXXXXXXX......O ",
" .XXXXXXXXXXXXXXXXXXoooo.O ",
" .XXXXXXXXXXXXXXXXXXXooo.O ",
" .XXXXXXXXXXXXXXXXXXXXXX.O ",
" ....XXXX.......XXXX.....O ",
" .XXX.XX.XXXXXXX.XX.XXXX.O ",
" ...XX..XX.....XX..XX....O ",
" .X........XXX........XX.O ",
" ..XXXXXXXX.X.XXXXXXXX.X.O ",
" ..XXXXXXXX.X.XXXXXXXX.X.O ",
" .X........XXX........XX.O ",
" ...XX..XX.....XX..XX....O ",
" .XXX.XX.XXXXXXX.XX.XXXX.O ",
" ....XXXX.......XXXX.....O ",
" .XXXXXXXXXXXXXXXXXXXXXX.O ",
" .XXXXXXXXXXXXXXXXXXXXXX.O ",
" .XXXXXXXXXXXXXXXXXXXXXX.O ",
" .XXXXoXXXoXoXXoXoXXoXXX.O ",
" .XXXXoXXXoXooXoXoXoXXXX.O ",
" .XXXXoXXXoXoXooXooXXXXX.O ",
" .XXXXoXXXoXoXXoXoXoXXXX.O ",
" .XXXXoooXoXoXXoXoXXoXXX.O ",
" .XXXXXXXXXXXXXXXXXXXXXX.O ",
" .XXXXXXXXXXXXXXXXXXXXXX.O ",
" ........................O ",
" OOOOOOOOOOOOOOOOOOOOOOOO "};

40
icons/bug.xpm Normal file
View File

@ -0,0 +1,40 @@
/* XPM */
static char * bug[] = {
"32 32 5 1",
" c None s None",
". c black",
"X c lemon chiffon",
"o c tan",
"O c gray50",
" ................. ",
" .XXXXXXXXXXXXXX.o. ",
" .XXXXXXXXXXXXXX.oo. ",
" .XXXXXXXXXXXXXX.ooo. ",
" .XXXXXXXXXXXXXX.oooo. ",
" .XXXXXXXXXXXXXX.ooooo. ",
" .XXXXXXXXXXXXXX.oooooo. ",
" .XXXXXXXXXXXXXX.........O ",
" .XXXXXXXXXXXXXXXooooooo.O ",
" .XXXXXXXXXXXXXXXooooooo.O ",
" .XXXXXXXXXXXXXXXXXXXXXX.O ",
" .XXXXXXXXXXXXXXXXXXXXXX.O ",
" .XXXXXXXXXXXXXXXXXXXXXX.O ",
" .XXXXXXXXXXXXXXXXXXXXXX.O ",
" .XXXXXXXXXXXXXXXXXXXXXX.O ",
" .XXXXXXXX.XX..XXXXXXXXX.O ",
" .XXXXX.XX.X....XXXXXXXX.O ",
" .XXXXXX.X..X...XXXXXXXX.O ",
" .XXXXXXX......XXXXXXXXX.O ",
" .XXX...X.....XXXXXXXXXX.O ",
" .XXXXX..X......XXXXXXXX.O ",
" .XXXX.X.....XXXXXXXXXXX.O ",
" .XXX......XX.XXXXXXXXXX.O ",
" .XXX......XXX.XXXXXXXXX.O ",
" .XXX.......XXXXXXXXXXXX.O ",
" .XXX.....X.XXXXXXXXXXXX.O ",
" .XXXX...XX.XXXXXXXXXXXX.O ",
" .XXXXXXXXXXXXXXXXXXXXXX.O ",
" .XXXXXXXXXXXXXXXXXXXXXX.O ",
" .XXXXXXXXXXXXXXXXXXXXXX.O ",
" ........................O ",
" OOOOOOOOOOOOOOOOOOOOOOOO "};

42
icons/c.xpm Normal file
View File

@ -0,0 +1,42 @@
/* XPM */
static char * dot[] = {
"32 32 7 1",
", c None s None",
" c white",
". c black",
"X c lemon chiffon",
"o c tan",
"O c slate gray",
"+ c gray50",
",,,,..................,,,,,,,,,,",
",,,,.XXXXXXXXXXXXXXXX..,,,,,,,,,",
",,,,.XXXXXXXXXXXXXXXX.o.,,,,,,,,",
",,,,.XXXXXXXXXXXXXXXX.oo.,,,,,,,",
",,,,.XXOOOOOOOOOOOOXX.ooo.,,,,,,",
",,,,.XXXXXXXXXXXXXXXX.oooo.,,,,,",
",,,,.XXOOOOOOOOOOOOXX.ooooo.,,,,",
",,,,.XXXXXXXXXXXXXXXX.......+,,,",
",,,,.XXXXXXOOOOOOXXXXXooooo.+,,,",
",,,,.XXXXXXXXXXXXXXXXXXoooo.+,,,",
",,,,.XXXXXXOOOOOOOOXXXXXXXX.+,,,",
",,,,.XXXXXXXXXXXXXXXXXXXXXX.+,,,",
",,,,.XXXXXXXXXXOOOOOOOXXXXX.+,,,",
",,,,.XXXXXXXXXXXXXXXXXXXXXX.+,,,",
",,,,.XXXXXXXXXXOOOOOOOOOXXX.+,,,",
",,,,.XXXXXXXXXXXXXXXXXXXXXX.+,,,",
",,,,.XXXXXXOOOOOOOOOXXXXXXX.+,,,",
",,,,.XXXXXXXXXXXXXXXXXXXXXX.+,,,",
",,,,.XXXXXXOOOOOOOOXXXXXXXX.+,,,",
",,,,.XXXXXXXXXXXXXXX....XXX.+,,,",
",,,,.XXXXXXXXXXOOX........X.+,,,",
",,,,.XXXXXXXXXXXXX...XX...X.+,,,",
",,,,.XXOOOOOOOOOX...XXXXXXX.+,,,",
",,,,.XXXXXXXXXXXX...XXXXXXX.+,,,",
",,,,.XXXXXXOOOOOX...XXXXXXX.+,,,",
",,,,.XXXXXXXXXXXX...XXXXXXX.+,,,",
",,,,.XXXXXXOOOX..X...XX...X.+,,,",
",,,,.XXXXXXXXXX..X........X.+,,,",
",,,,.XXXXXXXXXX..XXX....XXX.+,,,",
",,,,.XXXXXXXXXXXXXXXXXXXXXX.+,,,",
",,,,........................+,,,",
",,,,,++++++++++++++++++++++++,,,"};

44
icons/calc.xpm Normal file
View File

@ -0,0 +1,44 @@
/* XPM */
static char * calc_xpm[] = {
/* width height ncolors chars_per_pixel */
"32 32 6 1",
/* colors */
" s None c None",
". c white",
"X c gray",
"o c black",
"O c black",
"+ c red",
/* pixels */
" ",
" ",
" ......................X ",
" .XXXXXXXXXXXXXXXXXXXXXo ",
" .ooooooooooooooooooooXo ",
" .oOOOOOOOOOOOOOOOOOOO.o ",
" .oOOOOOOOO+O++O+O++OO.o ",
" .oOOOOOOOO+OO+O+O++OO.o ",
" .oOOOOOOOOOOOOOOOOOOO.o ",
" .X....................o ",
" .XXXXXXXXXXXXXXXXXXXXXo ",
" .X....XXX....XXX....XXo ",
" .X.XXOoXX.XOXoXX.XOXoXo ",
" .X.XOXoXX.XOXoXX.XOXoXo ",
" .XXooooXXXooooXXXooooXo ",
" .XXXXXXXXXXXXXXXXXXXXXo ",
" .X....XXX....XXX....XXo ",
" .X.XXXoXX.XXXoXX.XOXoXo ",
" .X.XOOoXX.XOXoXX.OXXoXo ",
" .XXooooXXXooooXXXooooXo ",
" .XXXXXXXXXXXXXXXXXXXXXo ",
" .X....XXX....XXX....XXo ",
" .X.XXXoXX.XOXoXX.XOXoXo ",
" .X.XOXoXX.XXOoXX.XOXoXo ",
" .XXooooXXXooooXXXooooXo ",
" .XXXXXXXXXXXXXXXXXXXXXo ",
" .X....XXX....XXX....XXo ",
" .X.XXXoXX.XOXoXX.XOXoXo ",
" .X.XOXoXX.XOXoXX.XXOoXo ",
" .XXooooXXXooooXXXooooXo ",
" .XXXXXXXXXXXXXXXXXXXXXo ",
" Xoooooooooooooooooooooo "};

62
icons/calendar.xpm Normal file
View File

@ -0,0 +1,62 @@
/* XPM */
static char * calendar_xpm[] = {
"64 54 5 1 0 0",
" s None c None",
". c black",
"X c gold",
"o c white",
"O c red",
" ",
" ",
" ",
" .. .. ",
" .X.. .XX. ",
" .XX. .X.. ",
" .X.. .XX. ",
" .............XX................X.............. ",
" .ooooooooooo.X..oo.o.ooooooooo.XX.oo.o.oooooo. ",
" .ooooooooooo.XX.o.o.oooooooooo.X..o.o.ooooooo. ",
" .ooooooooooo.X...o.o.ooooooooo.XX..o.o.oooooo.. . ",
" .ooooooooooo.XX.o.o.oooooooooo.X..o.o.ooooooo.o.o. ",
" .oooooooooo..X...o.oooooooooo..XX..o.oooooooo..o. ",
" .oooooooooo..XX...ooooooooooo..X....ooooooooo.o.o. ",
" .oooooooooo......oooooooooooo......oooooooooo..o. ",
" .ooooooooooo....oooooooooooooo....ooooooooooo.o.o. ",
" .oooooooooooooooooooooooooooooooooooooooooooo..o. ",
" .oooooooooooooooooooooooooooooooooooooooooooo.o.o. ",
" .ooooooooooooooooooooooOOOOOooooooooooooooooo..o. ",
" .ooooooooooooooooooooOOOOOOOooooooooooooooooo.o.o. ",
" .ooooooooooooooooooOOOOOOOOOooooooooooooooooo..o. ",
" .ooooooooooooooooooOOOOOOOOOooooooooooooooooo.o.o. ",
" .ooooooooooooooooooOOOOOOOOOooooooooooooooooo..o. ",
" .ooooooooooooooooooOOOOOOOOOooooooooooooooooo.o.o. ",
" .ooooooooooooooooooooooOOOOOooooooooooooooooo..o. ",
" .ooooooooooooooooooooooOOOOOooooooooooooooooo.o.o. ",
" .ooooooooooooooooooooooOOOOOooooooooooooooooo..o. ",
" .ooooooooooooooooooooooOOOOOooooooooooooooooo.o.o. ",
" .ooooooooooooooooooooooOOOOOooooooooooooooooo..o. ",
" .ooooooooooooooooooooooOOOOOooooooooooooooooo.o.o. ",
" .ooooooooooooooooooooooOOOOOooooooooooooooooo..o. ",
" .ooooooooooooooooooooooOOOOOooooooooooooooooo.o.o. ",
" .ooooooooooooooooooooooOOOOOooooooooooooooooo..o. ",
" .ooooooooooooooooooooooOOOOOooooooooooooooooo.o.o. ",
" .ooooooooooooooooooooooOOOOOooooooooooooooooo..o. ",
" .ooooooooooooooooooooooOOOOOooooooooooooooooo.o.o. ",
" ..........oooooooooooooOOOOOooooooooooooooooo..o. ",
" ..ooooooo.oooooooooooooOOOOOooooooooooooooooo.o.o. ",
" .o.oooooo.oooooooooooooOOOOOooooooooooooooooo..o. ",
" .oo.ooooo.oooooooooooooOOOOOooooooooooooooooo.o.o. ",
" .ooo.oooo.ooooooooooooooooooooooooooooooooooo..o. ",
" .oooo.ooo.ooooooooooooooooooooooooooooooooooo.o.o. ",
" .ooooo.oo.ooooooooooooooooooooooooooooooooooo..o. ",
" .oooooo.o.ooooooooooooooooooooooooooooooooooo.o.o. ",
" .ooooooo..ooooooooooooooooooooooooooooooooooo..o. ",
" ..............................................o.o. ",
" .o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o. ",
" .o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o. ",
" .o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o. ",
" . . . . . . . . . . . . . . . . . . . . . . . . ",
" ",
" ",
" ",
" "};

40
icons/cc.xpm Normal file
View File

@ -0,0 +1,40 @@
/* XPM */
static char * dot_cc[] = {
"32 32 5 1",
" c None s None",
". c black",
"X c lemon chiffon",
"o c tan",
"O c gray50",
" .................. ",
" .XXXXXXXXXXXXXXXX.. ",
" .XXXXXXXXXXXXXXXX.o. ",
" .XXXXXXXXXXXXXXXX.oo. ",
" .XX............XX.ooo. ",
" .XXXXXXXXXXXXXXXX.oooo. ",
" .XX............XX.ooooo. ",
" .XXXXXXXXXXXXXXXX.......O ",
" .XXXXXX......XXXXXooooo.O ",
" .XXXXXXXXXXXXXXXXXooooo.O ",
" .XXXXXX........XXXXXXXX.O ",
" .XXXXXXXXXXXXXXXXXXXXXX.O ",
" .XXXXXXXXXX.......XXXXX.O ",
" .XXXXXXXXXXXXXXXXXXXXXX.O ",
" .XXXXXXXXXX.........XXX.O ",
" .XXXXXXXXXXXXXXXXXXXXXX.O ",
" .XXXXXX.........XXXXXXX.O ",
" .XXXXXXXXXXXXXXXXXXXXXX.O ",
" .XXXXXXXXXXX...XXXXXXXX.O ",
" .XXXXXX....XXXXX....XXX.O ",
" .XXXX........X........X.O ",
" .XXXX...XX...X...XX...X.O ",
" .XXX...XXXXXX...XXXXXXX.O ",
" .XXX...XXXXXX...XXXXXXX.O ",
" .XXX...XXXXXX...XXXXXXX.O ",
" .XXX...XXXXXX...XXXXXXX.O ",
" .X..X...XX...X...XX...X.O ",
" .X..X........X........X.O ",
" .X..XXX....XXXXX....XXX.O ",
" .XXXXXXXXXXXXXXXXXXXXXX.O ",
" ........................O ",
" OOOOOOOOOOOOOOOOOOOOOOOO "};

56
icons/cdrom.xpm Normal file
View File

@ -0,0 +1,56 @@
/* XPM */
static char * cdrom_view_xpm[] = {
/* width height ncolors chars_per_pixel */
"64 38 12 1",
/* colors */
" s None c None",
". c grey",
"X c navy blue",
"o c slate grey",
"O c violet",
"+ c gainsboro",
"@ c yellow",
"# c white",
"$ c orange",
"% c black",
"& c sky blue",
"* c cyan",
/* pixels */
" .......................................X ",
" ......................................XX ",
" ..ooooooooooooooooooooooooooooooooooooXX ",
" ..oooooooooooooooo.....oooooooooooooooXX ",
" ..ooooooooooooo...OOOOO...ooooooooooooXX ",
" ..ooooooooooo..+OOOOOOOOOO..ooooooooooXX ",
" @@o.ooooooooo..++++OOOOOOOOOOO..ooooooooXX ",
" @@@o @@ooo.oooooooo.++++++OOOOOOOOOOOOO.oooooooXX ",
" @@oo @o##..ooooooo.+++++++OOOOOOOOOOOOOO.ooooooXX ",
" @@o @o##..oooooo.+++++++++OOOOOOOOOOOOOO.oooooXX ",
" @o @o##..oooooo.+++++++++OOOOOOOOOOOOOO.oooooXX ",
" o@o $@##..ooooo.+++++++++++OOOOOOOOOOOOOO.ooooXX ",
" o@o o$$@..ooooo.O++++++++++OOOOOOOOOOOOOO.ooooXX ",
" o$@ oo$@@oooo.OOOO++++++++###OOOOOOOOOOOO.oooXX ",
" o$@ o$$@ooo.OOOOOO++++..+OO##OOOOOOOOOO.oooXX ",
" o@ oo$$@o.OOOOOOOO+..+%%%OO#OOOOOOOOO.oooXX ",
" o@ ..oo$@@OOOO@@@@@#+%ooo%O#OOOOOOOOOO.ooXX ",
" o$ ..ooo$$@OO@@&&&@@%ooooo%O#OOOOOOOOO.ooXX ",
" o$ ..ooooo$@@@&###&&@ooooo%O#OOOOOOOOO.%oXX ",
" o$@ ..ooo.Oo@@@&&&#&&@@oooo%O#OOOOOOOOO.%oXX ",
" o$@ @@@@@ ..ooo.Oo@&&###&&#*@ooo%+++OOOOOOOOO.%oXX ",
" o$@ @@&&&&&@@.oooo.@&&&&&###*#@@%%+++.+++OOOOO.%%oXX ",
" o$@ @@&&###&&@@ooooo@&&&&&&&##&&@OO+...+++++++O.%%oXX ",
" o@ @&&&&&##&&@@oooo@&&&&&&&&#@&@##O+++++++++++.%ooXX ",
" o$ @@&####**#&&@@ooo@&&&&&&&&&&@@@OO++++++++++.%%ooXX ",
" o$@ @&&&&&##**#&&@ooo@&&&&&&&&&&&&@OOO+++++++++.%oooXX ",
" o$@ @&&&&&&&##&&&@@o@@&&&&&&&&&&@@@OOO++++++++.%%oooXX ",
" o$@ @&&&&&&&&#&&&&@o@&&&&&&&@@@@oooOOO++++++++.%ooooXX ",
" o$@ @&&&&&&&&&&&&&@o@&&&@@@@oooooooOOOO++++++.%%ooooXX ",
" o$@@@&&&&&&&&&&&&&&@@@@oooooooooOOOOOOO+++++.%%oooooXX ",
" oo$@&&&&&&&&&&&@@@@oooooooooOOOOOOOOOOOO++..%%ooooooXX ",
" o$@&&&&&&&&@@ooooooooooo%%..OOOOOOOOOOO..%%%oooooooXX ",
" o$@&&&@@oooooooooooooooooo%%...OOOOO...%%%%ooooooooXX ",
" o$@@ooooooooo..ooooooooooooo%%%.....%%%%%ooooooooooXX ",
" oooooooo ..oooooooooooooooo%%%%%%%oooooooooooooXX ",
" ooo ..ooooooooooooooooooooooooooooooooooooXX ",
" ..XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ",
" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX "};

44
icons/clipboard.xpm Normal file
View File

@ -0,0 +1,44 @@
/* XPM */
static char * clipboard_xpm[] = {
/* width height ncolors chars_per_pixel */
"32 32 6 1",
/* colors */
" s None c None",
". c black m black",
"X c black",
"o c gray",
"O c lightgray",
"+ c white",
/* pixels */
" ",
" .... ",
" .XX. ",
" .XX. ",
" .................. ",
" .oOoO...o...o.. OoO. ",
" .oOOXOOOOoOOOoOOoXOoO. ",
" .OoOXXXXXXXXXXXXXXoOO. ",
" .oOoOoOOX+++++++XoOOO. ",
" .OOOoOoX+++++++++XoOo. ",
" .oOoOOX+++++++++++XoO. ",
" .OoOOX+++++++++++++Xo. ",
" .oOOX+++++++++++++XoO. ",
" .OoX+++++++++++++XoOO. ",
" .oX+++++++++++++XoOOO. ",
" .OoX+++++++++++XoOOOo. ",
" .oOoX+++++++++XoOOOoO. ",
" .OOOoX+++++++XoOOOoOo. ",
" .oOoOoX+++++XoOOOoOoO. ",
" .OoOOOoX+++XoOOOoOoOo. ",
" .oOOOoOoX+XoOOOoOoOoO. ",
" .OoOoOOOoXoOOOoOoOoOo. ",
" .oOOOoOoOOOoOoOoOoOoO. ",
" .OoOoOOOoOoOoOoOoOoOo. ",
" .oOOOoOoOOOoOOOoOoOOO. ",
" .OoOoOOOoOoOOOoOOOoOo. ",
" .oOOOoOoOOOoOoOoOoOOO. ",
" .OoOoOOOoOoOOOoOOOoOo. ",
" .oOOOoOoOOOoOoOOOoOoO. ",
" .OoOoOOOoOoOOOoOoOoOo. ",
" .OOOoOoOOOoOoOOOoOo. ",
" .................. "};

40
icons/compressed.xpm Normal file
View File

@ -0,0 +1,40 @@
/* XPM */
static char * compressed[] = {
"32 32 5 1",
" c None s None",
". c black",
"X c lemon chiffon",
"o c tan",
"O c gray50",
" .................. ",
" .XXXXXXXXXXXXXXXX.. ",
" .XXXXXXXXXXXXXXXX.o. ",
" .XXXXXXXXX....XXX.oo. ",
" .XXXXXXXXXXX...XX.ooo. ",
" .XXXXXXXX.....XXX.oooo. ",
" .XXXXXXXXXXX...XX.ooooo. ",
" .XXXXXXXX.....XXX.......O ",
" .XXXXXXXXXXX...XXXooooo.O ",
" .XXXXXXXX.....XXXXooooo.O ",
" .XXXXXX..........XXXXXX.O ",
" .XXXXX.XX.XXXX.XX.XXXXX.O ",
" .XXXXX.XX.XXXX.XX.XXXXX.O ",
" .XXXXX............XXXXX.O ",
" .XXXX.X.X.X........XXXX.O ",
" .XXX................XXX.O ",
" .XXX................XXX.O ",
" .XXX................XXX.O ",
" .XXXX..............XXXX.O ",
" .XXXXX.XX.XXXX.XX.XXXXX.O ",
" .XXXXX.XX.XXXX.XX.XXXXX.O ",
" .XXXXXX..........XXXXXX.O ",
" .XXXXXXXXXXX...XXXXXXXX.O ",
" .XXXXXXXX.....XXXXXXXXX.O ",
" .XXXXXXXXXXX...XXXXXXXX.O ",
" .XXXXXXXX.....XXXXXXXXX.O ",
" .XXXXXXXXXXX...XXXXXXXX.O ",
" .XXXXXXXXX....XXXXXXXXX.O ",
" .XXXXXXXXXXXXXXXXXXXXXX.O ",
" .XXXXXXXXXXXXXXXXXXXXXX.O ",
" ........................O ",
" OOOOOOOOOOOOOOOOOOOOOOOO "};

44
icons/core.xpm Normal file
View File

@ -0,0 +1,44 @@
/* XPM */
static char * core[] = {
"32 32 9 1",
", c None s None",
" c white",
". c black",
"X c lemon chiffon",
"o c tan",
"O c red",
"+ c yellow",
"@ c gray50",
"# c slate grey",
",,,,..................,,,,,,,,,,",
",,,,.XXXXXXXXXXXXXXXX..,,,,,,,,,",
",,,,.XXXXXXXXXXXXXXXX.o.,,,,,,,,",
",,,,.XXXXXXXXXXXXXXXX.oo.,,,,,,,",
",,,,.XXXXXXXXXXXXXXXX.ooo.,,,,,,",
",,,,.XXXXXXXXOXXXXXXX.oooo.,,,,,",
",,,,.XXXXXOXXOXOXXXXX.ooooo.,,,,",
",,,,.XXXXXXO+O+O+XXXX.......@,,,",
",,,,.XXXXX+++++++XXXXXooooo.@,,,",
",,,,.XXXXOOO+++OOOOXXXXoooo.@,,,",
",,,,.XXXXX++++++++XXXXXXXXX.@,,,",
",,,,.XXXXXXO+OXOOOXXXXXXXXX.@,,,",
",,,,.XXXXXOX+OXO..XXXXXXXXX.@,,,",
",,,,.XXXXXO+XOX...XXXXXXXXX.@,,,",
",,,,.XXXXXXXXX....XXXXXXXXX.@,,,",
",,,,.XXXXXXX........XXXXXXX.@,,,",
",,,,.XXXXX............XXXXX.@,,,",
",,,,.XXXXX.@..........XXXXX.@,,,",
",,,,.XXXX.#@@..........XXXX.@,,,",
",,,,.XXXX. @#.........XXXX.@,,,",
",,,,.XXXX. @##........XXXX.@,,,",
",,,,.XXXX. @@#.........XXXX.@,,,",
",,,,.XXXX.@@##.........XXXX.@,,,",
",,,,.XXXXX.##.........XXXXX.@,,,",
",,,,.XXXXX............XXXXX.@,,,",
",,,,.XXXXXX..........XXXXXX.@,,,",
",,,,.XXXXXXX........XXXXXXX.@,,,",
",,,,.XXXXXXXXX....XXXXXXXXX.@,,,",
",,,,.XXXXXXXXXXXXXXXXXXXXXX.@,,,",
",,,,.XXXXXXXXXXXXXXXXXXXXXX.@,,,",
",,,,........................@,,,",
",,,,,@@@@@@@@@@@@@@@@@@@@@@@@,,,"};

42
icons/data.xpm Normal file
View File

@ -0,0 +1,42 @@
/* XPM */
static char * data[] = {
"32 32 7 1",
" c None s None",
"` c black",
"a c tan",
"b c gray50",
"c c white",
"d c slate grey",
"e c lemon chiffon",
" ``````````````````` ",
" `eeeeeeeeeeeeeeeee`` ",
" `eeeeeeeeeeeeeeeee`a` ",
" `eeeeeeeeeeeeeeeee`aa` ",
" `eeeeeeeeeeeeeeeee`aaa` ",
" `eeeeeeeeeeeeeeeee`aaaa` ",
" `eeeeeeeeeeeeeeeee`aaaaa` ",
" `eeeeeeeeeeeeeeeee```````b ",
" `eeeeeeeeeeeeeeeeeeaaaaa`b ",
" `eeedddddddddddddddddaaa`b ",
" `eeeeeeeeeeeeeeeeeeeeeee`b ",
" `eeedddddddddddddddddeee`b ",
" `eeeeeeeeeeeeeeeeeeeeeee`b ",
" `eeedddddddddddddddddeee`b ",
" `eeeeeeeeeeeeeeeeeeeeeee`b ",
" `eeedddddddddddddddddeee`b ",
" `eeeeeeeeeeeeeeeeeeeeeee`b ",
" `eeedddddddddddddddddeee`b ",
" `eeeeeeeeeeeeeeeeeeeeeee`b ",
" `eeedddddddddddddddddeee`b ",
" `eeeeeeeeeeeeeeeeeeeeeee`b ",
" `eeedddddddddddddddddeee`b ",
" `eeeeeeeeeeeeeeeeeeeeeee`b ",
" `eeedddddddddddddddddeee`b ",
" `eeeeeeeeeeeeeeeeeeeeeee`b ",
" `eeedddddddddddddddddeee`b ",
" `eeeeeeeeeeeeeeeeeeeeeee`b ",
" `eeedddddddddddddddddeee`b ",
" `eeeeeeeeeeeeeeeeeeeeeee`b ",
" `eeeeeeeeeeeeeeeeeeeeeee`b ",
" `````````````````````````b ",
" bbbbbbbbbbbbbbbbbbbbbbbbb "};

42
icons/draw.xpm Normal file
View File

@ -0,0 +1,42 @@
/* XPM */
static char * draw_xpm[] = {
/* width height ncolors chars_per_pixel */
"32 32 4 1",
/* colors */
" c #FFF",
". c black",
"X c white",
"o c gray",
/* pixels */
" .................. ",
" .XXXXXXXXXXXXXXXX.. ",
" .XXXXXXXXXXXXXXXX.o. ",
" .XXXXXXXXXXXXXXXX.oo. ",
" .XXXXXXXXXXXXX.XX.ooo. ",
" .XXXXXXXXXXXX.XXX.oooo. ",
" .XXXXXXXXXXX.XXXX.ooooo. ",
" .XXXXXXXXXX.XXXXX........ ",
" .XXXXXXXXX.XXXXXXXooooo.. ",
" .X....XXX.XXXXXXXXXoooo.. ",
" .XXXXX..XXXXXXXXXXXXXXX.. ",
" .XXXXXX..XXXXXXXXXXXXXX.. ",
" .XXXXX.X.XXXXXXXXXXXXXX.. ",
" .XXXX.XXX.XXXXXXXXXXXXX.. ",
" .X.X.XXXX.XXXXXXXXXXXXX.. ",
" .XX.XXXXX.XXXXXXXXXX.XX.. ",
" .X.X.XXXX.XXXX.XXXXX.XX.. ",
" .XXXX.XXX.XXXX...XX..XX.. ",
" .XXXXX.X.XXXXX.XX..X.XX.. ",
" .XXXXXX..XXXXX.XXXXX.XX.. ",
" .XXXXX..XXXXXX.XXXX.XXX.. ",
" .X....XXX.XXX.XXXXX..XX.. ",
" .XXXXXXXXX.XX.XXXX..XXX.. ",
" .XXXXXXXXXXX.XXXX.. .XX.. ",
" .XXXXXXXXXX.XXX... .XXX.. ",
" .XXXXXXXXX.XX.. . . .XX.. ",
" .XXXXXXX.. ... . . .XXX.. ",
" .XXX.....X.X.X.X.X.X.XX.. ",
" .XXXXXXXXXXXXXXXXXXXXXX.. ",
" .XXXXXXXXXXXXXXXXXXXXXX.. ",
" ......................... ",
" ........................ "};

55
icons/edit.xpm Normal file
View File

@ -0,0 +1,55 @@
/* XPM */
static char * edit_xpm[] = {
"48 48 4 1",
" s None c None",
". c black",
"X c yellow",
"o c white",
" ",
" ",
" . ",
" ...........................................X ",
" .oooooooooooooooooooooooooooooooooooooooo.XX ",
" .ooooooooooooooooooooooooooooooooooooooo.XXX ",
" .oooooooooooooooooooooooooooooooooooooo.XXXX ",
" .ooooooooooooooooooooooooooooooooooooo.XXXXX ",
" .oooooooooooooooooooooooooooooooooooo.XXXXXX ",
" .ooo..o....oo.....o.....o.....o....o.XXXXXXX ",
" .oooooooooooooooooooooooooooooooooo.XXXXXXXX ",
" .ooo.......o..o..........ooooooooo.XXXXXXXXX ",
" .oooooooooooooooooooooooooooooooo.XXXXXXXXX. ",
" .ooo.....o...........o........oo.XXXXXXXXX.. ",
" .oooooooooooooooooooooooooooooo.XXXXXXXXX... ",
" .oooooo..........o.........ooo.XXXXXXXXX.... ",
" .oooooooooooooooooooooooooooo.XXXXXXXXX..... ",
" .ooo................o.....oo.XXXXXXXXX...... ",
" .oooooooooooooooooooooooooo.XXXXXXXXX....... ",
" .ooo..o...o...........o.oo.XXXXXXXXX........ ",
" .oooooooooooooooooooooooo.XXXXXXXXX......... ",
" .ooo.......o.ooo..oo..oo.XXXXXXXXX.......... ",
" .oooooooooooooooooooooo.XXXXXXXXX.......o... ",
" .ooo..o.....o.....o.oo.XXXXXXXXX.......oo... ",
" .oooooooooooooooooooo.XXXXXXXXX.......ooo... ",
" .ooo................o.oXXXXXXX.......o.oo... ",
" .ooooooooooooooooooo.oooXXXXX.......ooooo... ",
" .ooo..........oo..oo.oooooXX.......oooooo... ",
" .oooooooooooooooooo.oooooooX.oo...ooooooo... ",
" .ooooooooo..o....oo.ooooooo.o.o..oooooooo... ",
" .ooooooooooooooooo.ooooooo.o....ooooooooo... ",
" .ooo..........o.oo.oooooo.o....oo...ooooo... ",
" .oooooooooooooooo.oooooo.....oooooooooooo... ",
" .ooo....o......oo.ooooo....oooooooooooooo... ",
" .ooooooooooooooo.oooo....oooooooooooooooo... ",
" .ooo...o.....oo...o....oooooooooooooooooo... ",
" .oooooooooooooo......oooooooooooooooooooo... ",
" .ooooooooo...o.....ooo......o.......ooooo... ",
" .ooooooooooooo...oooooooooooooooooooooooo... ",
" .ooo.o......o..........o..o...o.......ooo... ",
" .oooooooooooooooooooooooooooooooooooooooo... ",
" .oooooooooooooooooooooooooooooooooooooooo... ",
" .oooooooooooooooooooooooooooooooooooooooo... ",
" .oooooooooooooooooooooooooooooooooooooooo... ",
" ............................................ ",
" ........................................... ",
" .......................................... ",
" "};

64
icons/editor.xpm Normal file
View File

@ -0,0 +1,64 @@
/* XPM */
static char * editor_xpm[] = {
"64 56 5 1",
" c white",
". s none c none",
"X c #BEFBBEFBBEFB",
"o c #C30B618575D6",
"O c black",
"................................................................",
"................................................................",
"................................................................",
"................................................................",
"................................................................",
"................................................................",
"............. X.............",
"............. ooooooooooooooooooooooooooooooooooooO.............",
"............. ooooooooooooooooooooooooooooooooooooO.............",
"............. ooo o o o ooooooooooooooooooO.............",
"............. ooooooooooooooooooooooooooooooooooooO.............",
"............. oOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOoO.............",
"............. o oO.............",
"............. o oO.............",
"............. o OO OOO O oO.............",
"............. o oO.............",
"............. o OOOOOOOO OOOOO OOO OOOOO oO.............",
"............. o oO.............",
"............. o OOOOO OOOO O OOOO OOO oO.............",
"............. o oO.............",
"............. o oO.............",
"............. o OO OOOOO OOO oO.............",
"............. o oO.............",
"............. o OOOOO OOO OOOO OO OOOOO oO.............",
"............. o oO.............",
"............. o OOOOOO O OOOOO OOOO oO.............",
"............. o oO.............",
"............. o oO.............",
"............. o OOO O OOOO oO.............",
"............. o oO.............",
"............. o OO OOOO O OOOO O OOO oO.............",
"............. o oO.............",
"............. o OOOO O OOOOO O OO oO.............",
"............. o oO.............",
"............. o OOOOO OOOO O OOOO OOO oO.............",
"............. o oO.............",
"............. o oO.............",
"............. o OOO O OOOO OO oO.............",
"............. o oO.............",
"............. o OOOO O OOOOO O OO OO oO.............",
"............. o oO.............",
"............. o oO.............",
"............. o OO O OOO oO.............",
"............. o oO.............",
"............. o O OOOO OOOO OOO OOO OOO oO.............",
"............. o oO.............",
"............. o oO.............",
"............. o oO.............",
"............. ooooooooooooooooooooooooooooooooooooO.............",
".............XOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.............",
"................................................................",
"................................................................",
"................................................................",
"................................................................",
"................................................................",
"................................................................"};

52
icons/emacs.xpm Normal file
View File

@ -0,0 +1,52 @@
/* XPM */
static char * emacs_xpm[] = {
"64 38 11 1",
" s None c None",
". c gray",
"X c white",
"o c black",
"O c black",
"+ c lightgray",
"@ c #c06077",
"# c lightblue",
"$ c white",
"% c gray",
"& c white",
" .XXXXo...... ",
" .XXXXXXXXXXX....... ",
" .XXOOXXXXXXXXXXXXX...... ",
" ..XXXXOOOOXXXXXXXXXXXXXo...... ",
" ++++++++++++++++++.XXXXXXXXXOOOOXXXXXXXXXXXXXXXX.. ",
" ++++++++++++++++++..XXX@@@XX@@X@XOO@@@XXX@@@XXX@@@X. ",
" ++++++++++++++++++o.XXX@XXX@X@X@X@XXXXX@O@XXX@X@XXX@X. ",
" ++++OOOOOOOOOOOOOO.XXXX@@@@@X@X@X@XX@@@@X@OOOXXX@@XX . ",
" +++OO############..XXXX@XXXXX@X@X@X@XXX@X@XXXOOOXX@XXX. ",
" +++O##XXXXXXXX###.XXXoo@XXX@X@X@X@X@XXX@X@XXX@X@XXX@X . ",
" +++O#XXXX#######.XXXXXXX@@@XX@XXX@XX@@@@XX@@@XXX@@@XX . ",
" +++O#XX########..XXXXXXXXXXOOXXXXXXXXOOXXXXXXXXXXXXX.X. ",
" +++O#XX########.XXXXXXXXXXXXXOOOOXXXXXXOOOXXXXXXXXX. .. ",
" +++O#X########..XXXXXXXXXXXXXXXXXOOOXXXXXXXXXXXXXX.. . ",
" +++O#X#######..XXXXooXXX@@@XX@@X@XXX@@@XXX@@@XXX@@@ ",
" ++oo#########.XXXXXXXoo@XXX@X@X@X@XXXXX@X@XXX@X@X. @ ",
" +o$$ooo#####..XXXooXXXX@@@@@X@X@X@XX@@@@X@XXXXXX@@ ",
" o$$$$$$oooo#.XXXXXXoooo@XXXXX@X@X@X@XXX@X@XXXXXX. @ ",
" o$$$$$$$$$$ooooXXXXXXXXX@OXX@X@X@X@X@XXX@X@XXX@X@ @ ",
" o$$$$$$$$oooo$$oo XXXXXX@@@XX@XXX@XX@@@@XX@@@X. @@@ ",
" o$$$$$$$$$$$$oooo$%% ooXXXXXXOOOXXXXOOOXXXXXXXX.. ",
" o$$$$$$$$$$$$$$$$ooo%%XXXooXXXXXXXOOOXXXXOOOOXXX.. ",
" o$$$$$$$$$$$$$oooo$$$$ooo XXXXXXXXXXXXXXXXXXXXXXX. ",
"o$$$$$$$$$$$$$$$$$$ooo$$%%oXXX@@@XX@@X@XXX@@@XXX@@@ @@@ ",
"$$$$$$$$$$$$$$$$$$$$$$oo$%%Xo@XXX@X@X@X@XXXXX@X@X. @ @ @ ",
"$$$$$$$$$$$$$$$$$$$$$$$ooo%XX@@@@@X@X@X@XX@@@@X@X. @@ ",
"$$$$$$$$$$$$$$$$&&&&&&&$$ooXX@XXXXX@X@X@X@XXX@X@.. @ ",
"$$$$$$$$$$$$$$&&&ooooooooX%XX@XXX@X@X@X@X@XXX@X@ @ @ @ ",
"$$$$$$$$$$$$$$&&oXXXXXXoooo%X @@@XX@XXX@XX@@@@X.@@@ @@@ ",
"$$$$$$$$$$$$$$&&oXXXoooo$$$$%XXXXXXXXXXXXXXXXXo. ",
"$$$$$$$$$$$$$$$$ooo&&$$$$$$%XXXXXXXXXXXXXXXXXX.. ",
"$$$$$$$$$$$$$$$$$$$&$$$$$o%XXXXXXXXXXXXXXXXXX.. ",
"$$$$$$$$$$$$$$$$$$$$$$$ooXXXX @@@XX@@X@XXX@@@. @@@ @@@ ",
"$$$$$$$$$$$$$$$$$$$$$ooXXXXXX@XXX@X@X@X@XXXX.@ @ @ @ @ ",
"$$$$$$$$$$$$$$$$$$$ooXXXXXXXX@@@@@X@X@X@XX@@@@ @ @@ ",
"$$$oooooooooooooooooXXXXXXXXX@XXXXX@X@X@X@.. @ @ @ ",
"$ooo .....oXXXX@XXX@X@X@X@X@. @ @ @ @ @ ",
"o ....oX @@@XX@XXX@X.@@@@ @@@ @@@ "};

40
icons/f.xpm Normal file
View File

@ -0,0 +1,40 @@
/* XPM */
static char * dot_f[] = {
"32 32 5 1",
" c None s None",
". c black",
"X c lemon chiffon",
"o c tan",
"O c gray50",
" .................. ",
" .XXXXXXXXXXXXXXXX.. ",
" .XXXXXXXXXXXXXXXX.o. ",
" .XXXXXXXXXXXXXXXX.oo. ",
" .XX............XX.ooo. ",
" .XXXXXXXXXXXXXXXX.oooo. ",
" .XX............XX.ooooo. ",
" .XXXXXXXXXXXXXXXX.......O ",
" .XXXXX.......XXXXXooooo.O ",
" .XXXXXXXXXXXXXXXXXooooo.O ",
" .XXXXX..............XXX.O ",
" .XXXXXXXXXXXXXXXXXXXXXX.O ",
" .XXXXX....XXXXXXXXXXXXX.O ",
" .XXXXXXXXXXXXXXXXXXXXXX.O ",
" .XXXXX......XXXXXXXXXXX.O ",
" .XXXXXXXXXXXXXXXXXXXXXX.O ",
" .XXXXX....XXXXXX.....XX.O ",
" .XXXXXXXXXXXXXX......XX.O ",
" .XXXXX......XXX......XX.O ",
" .XXXXXXXXXXXXXX...XXXXX.O ",
" .XXXXX......XXX...XXXXX.O ",
" .XXXXXXXXXXXX.......XXX.O ",
" .XX.........X.......XXX.O ",
" .XXXXXXXXXXXX.......XXX.O ",
" .XX.........XXX...XXXXX.O ",
" .XXXXXXXXXXXXXX...XXXXX.O ",
" .XXXXX...XX..XX...XXXXX.O ",
" .XXXXXXXXXX..XX...XXXXX.O ",
" .XXXXXXXXXX..XX...XXXXX.O ",
" .XXXXXXXXXXXXXXXXXXXXXX.O ",
" ........................O ",
" OOOOOOOOOOOOOOOOOOOOOOOO "};

46
icons/fig.xpm Normal file
View File

@ -0,0 +1,46 @@
/* XPM */
static char * fig[] = {
"32 32 11 1",
", c None s None",
" c white",
". c black",
"X c lemon chiffon",
"o c tan",
"O c gray50",
"+ c sea green",
"@ c green",
"# c peru",
"$ c sienna",
"% c lime green",
",,,,..................,,,,,,,,,,",
",,,,.XXXXXXXXXXXXXXXX..,,,,,,,,,",
",,,,.X....X...XX..XXX.o.,,,,,,,,",
",,,,.XX.XXXX.XX.XXXXX.oo.,,,,,,,",
",,,,.XX...XX.XX.X..XX.ooo.,,,,,,",
",,,,.XX.XXXX.XX.XX.XX.oooo.,,,,,",
",,,,.X..XXX...XX..XXX.......,,,,",
",,,,.XXXXXXXXXXXXXXXXXooooo.O,,,",
",,,,.XXXXXXXXXXXXXXXXXXoo...O,,,",
",,,,.XXXXXXXXXXXXXXXXXX..+@.O,,,",
",,,,.XX...XXXXXXXXXXXX.+@@@.O,,,",
",,,,.X.###..XXXXXXXXX..@@@@.O,,,",
",,,,.X.$$###.XX......##@@@@.O,,,",
",,,,.XX...$$$..###$$$$@@@...O,,,",
",,,,.XXXXX..$$$$$$...@@@.@@.O,,,",
",,,,.XXXXXX.....X.+@@.@.@@@.O,,,",
",,,,.XXXXXXX.%.X.+@..@@@@@@.O,,,",
",,,,.XXXXXXX.%%X.@.@@@@.@.@.O,,,",
",,,,.XXXXXXX.%.X.@@...@.@@..O,,,",
",,,,.XXXXXX.%%.X.@.XX.@.@@@.O,,,",
",,,,.XXXXX.+%%.X...X.@@.@@@.O,,,",
",,,,.XXXX.++%%.XXXXX.@.@@@@.O,,,",
",,,,.XXX.+++%%%.XXX.@@@...@.O,,,",
",,,,.XX.+++%%%%.XX.@@@.XX.@.O,,,",
",,,,.XX.++%%%%%.XX.@@@.XX.@.O,,,",
",,,,.X.++...%%%%.X.@@@.X.@@.O,,,",
",,,,.X.+++%%%.%%.X.@@.XX.@@.O,,,",
",,,,.X.+++%%%%%%.X...XXX.@@.O,,,",
",,,,.X.+....%%%%.XXXXXXX.@@.O,,,",
",,,,.X.+++%%.%%%%.XXXXXX.@@.O,,,",
",,,,........................O,,,",
",,,,,OOOOOOOOOOOOOOOOOOOOOOOO,,,"};

40
icons/font.xpm Normal file
View File

@ -0,0 +1,40 @@
/* XPM */
static char * font[] = {
"32 32 5 1",
" c None s None",
". c black",
"X c lemon chiffon",
"o c tan",
"O c gray50",
" .................. ",
" .XXXXXXXXXXXXXXXX.. ",
" .XXXXXXXXXXXXXXXX.o. ",
" .XXXXXXXXXXXXXXXX.oo. ",
" .XXXXXXXXXXXXXXXX.ooo. ",
" .XXXXXXXXXX.XXXXX.oooo. ",
" .XXXXXXXXXXXXXXXX.ooooo. ",
" .XXXXXXXXXX.XXXXX.......O ",
" .XXXXXXXXXXXXXXXXXooooo.O ",
" .XXXX.X.X.X.X.X.X.ooooo.O ",
" .XXXXXXXXXXXXXXXX..XXXX.O ",
" .XXXX.XXXXX....XX.X.XXX.O ",
" .XXXXXXXXX..X..XX..XXXX.O ",
" .XXXX.XXX...XXXXX.X.XXX.O ",
" .XXXXXXXX...XXXXX..XXXX.O ",
" .XXXX.XXX...XXXXX.X.XXX.O ",
" .XXXXXXXX...XXXXX..XXXX.O ",
" .X..X.XX......XX..X...X.O ",
" .XXXXXXXX...XXXXX..XXXX.O ",
" .XXXX.XXX...XXXXX.X.XXX.O ",
" .XXXXXXXX...XXXXX..XXXX.O ",
" .XXXX.XXX...XXXXX.X.XXX.O ",
" .XXXXXXXX...XXXXX..XXXX.O ",
" .X..X.XX.....XX...X...X.O ",
" .XXXXXXXXXXXXXXXX..XXXX.O ",
" .XXXX.............X.XXX.O ",
" .XXXXX.X.X...X.X.X.XXXX.O ",
" .XXXXXX.X.X.X.X.X.X.XXX.O ",
" .XXXXX.X.X.X.X.X.X.XXXX.O ",
" .XXXXXXXXXXXXXXXXXXXXXX.O ",
" ........................O ",
" OOOOOOOOOOOOOOOOOOOOOOOO "};

40
icons/framemaker.xpm Normal file
View File

@ -0,0 +1,40 @@
/* XPM */
static char * framemaker[] = {
"32 32 5 1",
" c None s None",
". c black",
"X c lemon chiffon",
"o c tan",
"O c gray50",
" .................. ",
" .XXXXXXXXXXXXXXXX.. ",
" .XXXXXXXXXXXXXXXX.o. ",
" .XXXXXXXXXXXXXXXX.oo. ",
" .XXXXXXXXXXXXXXXX.ooo. ",
" .XXXXXXXXXXXXXXXX.oooo. ",
" .XXXXXXXXXXXXXXXX.ooooo. ",
" .XXXXXXXXXX..XXXX.......O ",
" .XXXXXXXXX....XXXXooooo.O ",
" .XXXXXXXX..XX..XXXooooo.O ",
" .XXXXXXX..X..X..XXXXXXX.O ",
" .XXXXXX..X....X..XXXXXX.O ",
" .XXXXX..X..XX..X..XXXXX.O ",
" .XXXX..X..X..X..X..XXXX.O ",
" .XXX..X..X....X..X..XXX.O ",
" .XXX.X..X..XX..X...XXXX.O ",
" .XXXX..X..XXXX....X.XXX.O ",
" .XXX..X..XXXXXX..X..XXX.O ",
" .XXX.X....XXXX..X..XXXX.O ",
" .XXXX...X..XX..X..X.XXX.O ",
" .XXX..X..X....X..X..XXX.O ",
" .XXXX..X..X..X..X..XXXX.O ",
" .XXXXX..X..XX..X..XXXXX.O ",
" .XXXXXX..X....X..XXXXXX.O ",
" .XXXXXXX..X..X..XXXXXXX.O ",
" .XXXXXXXX..XX..XXXXXXXX.O ",
" .XXXXXXXXX....XXXXXXXXX.O ",
" .XXXXXXXXXXXXXXXXXXXXXX.O ",
" .XXXXXXXXXXXXXXXXXXXXXX.O ",
" .XXXXXXXXXXXXXXXXXXXXXX.O ",
" ........................O ",
" OOOOOOOOOOOOOOOOOOOOOOOO "};

49
icons/gif.xpm Normal file
View File

@ -0,0 +1,49 @@
/* XPM */
static char * gif[] = {
"32 32 14 1",
", c None s None",
" c white",
". c black",
"X c cyan",
"o c tan",
"O c gray50",
"+ c slate grey",
"@ c sea green",
"# c lime green",
"$ c red",
"% c pale green",
"& c gainsboro",
"* c sienna",
"= c orange",
",,,,..................,,,,,,,,,,",
",,,,.XXXXXXXXXXXXXXXX..,,,,,,,,,",
",,,,.XXXXXXXXXXXXXXXX.o.,,,,,,,,",
",,,,.XXXX...XX.X....X.oo.,,,,,,,",
",,,,.XXX.XXX.X.X.XXXX.ooo.,,,,,,",
",,,,.XXX.XXXXX.X...XX.oooo.,,,,,",
",,,,.XXX.XX..X.X.XXXX.ooooo.,,,,",
",,,,.XXX.XXX.X.X.XXXX.......O,,,",
",,,,.XXXX...XX.X.XXXXXXXXXX.O,,,",
",,,,.XXXXXXXXXXXXXXXXXXXXXX.O,,,",
",,,,.XXXXXXXXXXXXXXXXXXXXXX.O,,,",
",,,,.XXXXXXXXXXXXXXX..XXXXX.O,,,",
",,,,...XXXXXXXXXXXX.O.XXXXX.O,,,",
",,,,.OO.XXXX.XXXXX..OO.XXXX.O,,,",
",,,,.OOO.XX.O.XXX.OOOOO.XXX.O,,,",
",,,,.OOO+..OOO.X.OOOOOO.X...O,,,",
",,,,.O+O++OOOOO.OOOO@@@#.OO.O,,,",
",,,,.O++O+OOOOO++O@@@#@@#OO.O,,,",
",,,,.++OOO+OOOOO+@@@@@#@#@O.O,,,",
",,,,.+OOOOOO+OOOO@#@@@@@@@@.O,,,",
",,,,.......$$$$O@@@@#@@#@@O.O,,,",
",,,,.%%%%%$&$$$.@@@@@@@@@@..O,,,",
",,,,.%%%%$&&&$$$%@@%@*@@@%%.O,,,",
",,,,.%%%$&&&&&$$$%@%*=*%@%%.O,,,",
",,,,.%%$+&&&&&+$$%%%*=*%%%%.O,,,",
",,,,.%%%+&++&&+&$%%%*=*%%%%.O,,,",
",,,,.%%%+&++&&+&+%%%*=*%%%%.O,,,",
",,,,.%%%+&++&&++%%%%*=*%%%%.O,,,",
",,,,.%%%+++++++%%%%%***%%%%.O,,,",
",,,,.%%%%%%%%%%%%%%%%%%%%%%.O,,,",
",,,,........................O,,,",
",,,,,OOOOOOOOOOOOOOOOOOOOOOOO,,,"};

42
icons/h.xpm Normal file
View File

@ -0,0 +1,42 @@
/* XPM */
static char * dot[] = {
"32 32 7 1",
", c None s None",
" c white",
". c black",
"X c lemon chiffon",
"o c tan",
"O c slate gray",
"+ c gray50",
",,,,..................,,,,,,,,,,",
",,,,.XXXXXXXXXXXXXXXX..,,,,,,,,,",
",,,,.XXXXXXXXXXXXXXXX.o.,,,,,,,,",
",,,,.XXXXXXXXXXXXXXXX.oo.,,,,,,,",
",,,,.XXOOOOOOOOOOOOXX.ooo.,,,,,,",
",,,,.XXXXXXXXXXXXXXXX.oooo.,,,,,",
",,,,.XXOOOOOOOOOOOOXX.ooooo.,,,,",
",,,,.XXXXXXXXXXXXXXXX.......+,,,",
",,,,.XXXXXOOOOOOOXXXXXooooo.+,,,",
",,,,.XXXXXXXXXXXXXXXXXXoooo.+,,,",
",,,,.XXXXXOOOOOOOOOOOOOOXXX.+,,,",
",,,,.XXXXXXXXXXXXXXXXXXXXXX.+,,,",
",,,,.XXXXXOOOOXXXXXXXXXXXXX.+,,,",
",,,,.XXXXXXXXXXXXXXXXXXXXXX.+,,,",
",,,,.XXXXXOOOOOOXXXXXXXXXXX.+,,,",
",,,,.XXXXXXXXXXXXXXXXXXXXXX.+,,,",
",,,,.XXXXXOOOOXXX...XXXXXXX.+,,,",
",,,,.XXXXXXXXXXXX...XXXXXXX.+,,,",
",,,,.XXXXXOOOOOOX...XXXXXXX.+,,,",
",,,,.XXXXXXXXXXXX.......XXX.+,,,",
",,,,.XXXXXOOOOOOX........XX.+,,,",
",,,,.XXXXXXXXXXXX....X....X.+,,,",
",,,,.XXOOOOOOOOOX...XXX...X.+,,,",
",,,,.XXXXXXXXXXXX...XXX...X.+,,,",
",,,,.XXOOOOOOOOOX...XXX...X.+,,,",
",,,,.XXXXXXXXXXXX...XXX...X.+,,,",
",,,,.XXXXXOOOX..X...XXX...X.+,,,",
",,,,.XXXXXXXXX..X...XXX...X.+,,,",
",,,,.XXXXXXXXX..X...XXX...X.+,,,",
",,,,.XXXXXXXXXXXXXXXXXXXXXX.+,,,",
",,,,........................+,,,",
",,,,,++++++++++++++++++++++++,,,"};

41
icons/hidden.xpm Normal file
View File

@ -0,0 +1,41 @@
/* XPM */
static char * hidden[] = {
"32 32 6 1",
" c None s None",
". c black",
"X c lemon chiffon",
"o c tan",
"O c gray69",
"+ c gray50",
" .X.X.X.X.X.X.X.X.X ",
" XXXXXXXXXXXXXXXXX.X ",
" .XXXXXXXXXXXXXXXXXo. ",
" XXXXXXXXXXXXXXXXX.oo. ",
" .XXXXXXXXXXXXXXXXXooo. ",
" XXXXXXXXXXXXXXXXX.oooo. ",
" .XXXXXXXXXXXXXXXXXoooooX ",
" XXXXXXXXXXXXXXXXX.X.X.X.O ",
" .XXXXXXXXXXXXXXXXooooooX+ ",
" XXXXXXXXXXXXXXXXXXooooo.O ",
" .XXXXXXXXXXXXXXXXXXXXXXX+ ",
" XXXXXXXXXXXXXXXXXXXXXXX.O ",
" .XXXXXXXXXXXXXXXXXXXXXXX+ ",
" XXXXXXXXXXXXXXXXXXXXXXX.O ",
" .XXXXXXXXXXXXXXXXXXXXXXX+ ",
" XXXXXXXXXXXXXXXXXXXXXXX.O ",
" .XXXXXXXXXXXXXXXXXXXXXXX+ ",
" XXXXXXXXXXXXXXXXXXXXXXX.O ",
" .XXXXXXXXXXXXXXXXXXXXXXX+ ",
" XXXXXXXXXXXXXXXXXXXXXXX.O ",
" .XXXXXXXXXXXXXXXXXXXXXXX+ ",
" XXXXXXXXXXXXXXXXXXXXXXX.O ",
" .XXXXXXXXXXXXXXXXXXXXXXX+ ",
" XXXXXXXXXXXXXXXXXXXXXXX.O ",
" .XXXXXXXXXXXXXXXXXXXXXXX+ ",
" XXXXXXXXXXXXXXXXXXXXXXX.O ",
" .XXXXXXXXXXXXXXXXXXXXXXX+ ",
" XXXXXXXXXXXXXXXXXXXXXXX.O ",
" .XXXXXXXXXXXXXXXXXXXXXXX+ ",
" XXXXXXXXXXXXXXXXXXXXXXX.O ",
" .X.X.X.X.X.X.X.X.X.X.X.X+ ",
" +O+O+O+O+O+O+O+O+O+O+O+O "};

41
icons/hidden_dir.xpm Normal file
View File

@ -0,0 +1,41 @@
/* XPM */
static char * hidden_xpm[] = {
"32 32 6 1 0 0",
" s None c None",
". c black",
"X c tan",
"o c wheat",
"O c gray69",
"+ c gray50",
" ",
" ",
" ",
" ",
" ",
" .X.X.X. ",
" .XXXXXXX. ",
" XXXXXXXXX ",
" .o.o.o.o.o.o.o.o.o.o.o.o.o. ",
" .ooooooooooooooooooooooooooo.O ",
" ooooooooooooooooooooooooooooo+ ",
" .ooooooooooooooooooooooooooo.O ",
" ooooooooooooooooooooooooooooo+ ",
" .ooooooooooooooooooooooooooo.O ",
" ooooooooooooooooooooooooooooo+ ",
" .ooooooooooooooooooooooooooo.O ",
" ooooooooooooooooooooooooooooo+ ",
" .ooooooooooooooooooooooooooo.O ",
" ooooooooooooooooooooooooooooo+ ",
" .ooooooooooooooooooooooooooo.O ",
" ooooooooooooooooooooooooooooo+ ",
" .ooooooooooooooooooooooooooo.O ",
" ooooooooooooooooooooooooooooo+ ",
" .ooooooooooooooooooooooooooo.O ",
" ooooooooooooooooooooooooooooo+ ",
" .ooooooooooooooooooooooooooo.O ",
" ooooooooooooooooooooooooooooo+ ",
" .ooooooooooooooooooooooooooo.O ",
" ooooooooooooooooooooooooooooo+ ",
" .o.o.o.o.o.o.o.o.o.o.o.o.o.o.O ",
" +O+O+O+O+O+O+O+O+O+O+O+O+O+O+ ",
" "};

40
icons/html.xpm Normal file
View File

@ -0,0 +1,40 @@
/* XPM */
static char * html[] = {
"32 32 5 1",
" c None s None",
". c black",
"X c lemon chiffon",
"o c tan",
"O c gray50",
" .................. ",
" .XXXXXXXXXXXXXXXX.. ",
" .XXXXXXXXXXXXXXXX.o. ",
" .XXXXXXXXXXXXXX.X.oo. ",
" .XXXXX..........X.ooo. ",
" .XXXX...........X.oooo. ",
" .XXX...XXXXXXXX.X.ooooo. ",
" .XXX..XXXXXXXXXXX.......O ",
" .XXX..XXXXXXXXXXXXooooo.O ",
" .XXX...XXX....XXXXooooo.O ",
" .XXXX..X..X..X..XXXXXXX.O ",
" .XXXXXX....X..XX.XXXXXX.O ",
" .XXXXX.X.....X.XX.XXXXX.O ",
" .XXXXX.XX...X..XX.XXXXX.O ",
" .XXXX.XXX.....XXXX.XXXX.O ",
" .XXXX.XXX.....XXXX.XXXX.O ",
" .XXXX.XXXX....XXXX.XXXX.O ",
" .XXXX.XXXXX..XXXXX.XXXX.O ",
" .XXXXX.XXXXX....X.XXXXX.O ",
" .XXXXX.XXXXX....X.XXXXX.O ",
" .XXXXXX.XXXXX..X.XXXXXX.O ",
" .XXXXXXX..XXX...X..XXXX.O ",
" .XXXXXXXXX.....XX...XXX.O ",
" .XXXXXXXXXXXXXXXXX..XXX.O ",
" .XXXXXXXXXXXXXXXXX..XXX.O ",
" .XXXX..XXXXXXXXXX...XXX.O ",
" .XXX...............XXXX.O ",
" .XXX..............XXXXX.O ",
" .XXXX..XXXXXXXXXXXXXXXX.O ",
" .XXXXXXXXXXXXXXXXXXXXXX.O ",
" ........................O ",
" OOOOOOOOOOOOOOOOOOOOOOOO "};

44
icons/index.xpm Normal file
View File

@ -0,0 +1,44 @@
/* XPM */
static char * index[] = {
"32 32 9 1",
", c None s None",
" c white",
". c black",
"X c lemon chiffon",
"o c red",
"O c wheat",
"+ c dark slate grey",
"@ c slate grey",
"# c tan",
",,,...................,,,,,,,,,,",
",,,.XXXXXXXXXXXXXXXXX..,,,,,,,,,",
",,,.XXooXXXXXXXXXXXXX.O.,,,,,,,,",
",,,.XoXXoXXXXXXXXXXXX.OO.,,,,,,,",
",,,.XooooXXXXXXXXXXXX.OOO.,,,,,,",
",,,.XoXXoX+.@X@XXXXXX.OOOO.,,,,,",
",,,.XoXXoXXXXXXXXXXXX.......,,,,",
",,,.XXXXXXX.+@.XXXXXXX#####.,,,,",
",,,.XXXXXXXXXXXXXXXXXXX####.,,,,",
",,,.XX.+X.+@X@.X@@.XXXXXXXX.,,,,",
",,,.XXXXXXXXXXXXXXXXXXXXXXX.,,,,",
",,,.XXXX+@@.@.X@+XXXXXXXXXX.,,,,",
",,,.XXXXXXXXXXXXXXXXXXXXXXX.,,,,",
",,,.XXXXX+.X.@.+XXXXXXXXXXX.,,,,",
",,,.XXXXXXXXXXXXXXXXXXXXXXX.,,,,",
",,,.XXXX.+@.X+.XXXXXXXXXXXX.,,,,",
",,,.XXXXXXXXXXXXXXXXXXXXXXX.,,,,",
",,,.XX..X+X.+..@XXXXXXXXXXX.,,,,",
",,,.XXXXXXXXXXXXXXXXXXXXXXX.,,,,",
",,,.XXXX@.+..X+.XXXXXXXXXXX.,,,,",
",,,.XXXXXXXXXXXXXXXXXXXXXXX.,,,,",
",,,.XXXXXX+.X@.++.XXXXXXXXX.,,,,",
",,,.XXXXXXXXXXXXXXXXXXXXXXX.,,,,",
",,,.XX..@X.+.X.XXXXXXXXXXXX.,,,,",
",,,.XXXXXXXXXXXXXXXXXXXXXXX.,,,,",
",,,.XXXX@.@X.@++.XXXooooXXX.,,,,",
",,,.XXXXXXXXXXXXXXXXXXoXXXX.,,,,",
",,,.XXXXXXXXXXXXXXXXXoXXXXX.,,,,",
",,,.XXXXXXXXXXXXXXXXooooXXX.,,,,",
",,,.XXXXXXXXXXXXXXXXXXXXXXX.,,,,",
",,,.XXXXXXXXXXXXXXXXXXXXXXX.,,,,",
",,,.........................,,,,"};

42
icons/info.xpm Normal file
View File

@ -0,0 +1,42 @@
/* XPM */
static char * info_dot[] = {
"32 32 7 1",
" c None s None",
". c black",
"X c lemon chiffon",
"+ c white",
"@ c blue",
"o c tan",
"O c gray50",
" .................. ",
" .XXXXXXXXXXXXXXXX.. ",
" .XXXXXXXXXXXXXXXX.o. ",
" .XXXXXXXXXXXXXXXX.oo. ",
" .XXXXXXXXXXXXXXXX.ooo. ",
" .XXXXXXXXXXXXXXXX.oooo. ",
" .XXXXXXXXXXXXXXXX.ooooo. ",
" .XXXXXXXXXXXXXXXX.......O ",
" .XXXXXXXXXXXXXXXXXooooo.O ",
" .XXXXXXXX@@@@@@XXXooooo.O ",
" .XXXXXX@@@@@@@@@@XXXXXX.O ",
" .XXXXX@@@@@++@@@@@XXXXX.O ",
" .XXXX@@@@@++++@@@@@XXXX.O ",
" .XXX@@@@@@++++@@@@@@XXX.O ",
" .XXX@@@@@@@++@@@@@@@XXX.O ",
" .XX@@@@@@@@@@@@@@@@@@XX.O ",
" .XX@@@@@@+++++@@@@@@@XX.O ",
" .XX@@@@@@@++++@@@@@@@XX.O ",
" .XX@@@@@@@++++@@@@@@@XX.O ",
" .XX@@@@@@@++++@@@@@@@XX.O ",
" .XX@@@@@@@++++@@@@@@@XX.O ",
" .XXX@@@@@@++++@@@@@@XXX.O ",
" .XXX@@@@@++++++@@@@@XXX.O ",
" .XXXX@@@@@@@@@@@@@@XXXX.O ",
" .XXXXX@@@@@@@@@@@@XXXXX.O ",
" .XXXXXX@@@@@@@@@@XXXXXX.O ",
" .XXXXXXXX@@@@@@XXXXXXXX.O ",
" .XXXXXXXXXXXXXXXXXXXXXX.O ",
" .XXXXXXXXXXXXXXXXXXXXXX.O ",
" .XXXXXXXXXXXXXXXXXXXXXX.O ",
" ........................O ",
" OOOOOOOOOOOOOOOOOOOOOOOO "};

40
icons/jpeg.xpm Normal file
View File

@ -0,0 +1,40 @@
/* XPM */
static char * jpeg[] = {
"32 32 5 1",
" c None s None",
". c black",
"X c lemon chiffon",
"o c tan",
"O c gray50",
" .................. ",
" .XXXXXXXXXXXXXXXX.. ",
" .XXX..X...XXX..XX.o. ",
" .XXXX.X.XX.X.XX.X.oo. ",
" .XXXX.X.XX.X.XXXX.ooo. ",
" .XXXX.X...XX.X..X.oooo. ",
" .X.XX.X.XXXX.XX.X.ooooo. ",
" .XX..XX.XXXXX..XX.......O ",
" .XXXXXXXXXXXXXXXXXooooo.O ",
" .XXXXXXXXXXXXXXXXXooooo.O ",
" .XXXXXXXXXXXXXXXXXXXXXX.O ",
" .XXXXXXXXXXXXXXXX..XXXX.O ",
" .XX.XXXXXXXXXXXX.X.XXXX.O ",
" .X.X.XXXX.XXXXX..XX.XXX.O ",
" ..XXX.XX.X.XXX.XXXXX.XX.O ",
" .XXXXX..XXX.X.XXXXXX.XX.O ",
" .XXXXXXXXXXX.XXXX...X.X.O ",
" .XXXXXXXXXXXXXX...X..X..O ",
" .XXXXXXXXXXXXX..X..X.XX.O ",
" .XXXXXXXXXXXXX.X......X.O ",
" .XXXXXXX.XXXX....X..X.X.O ",
" .XXXXXX.X.XXX.........X.O ",
" .XXXXX.XXX.XXX..X.....X.O ",
" .XXXX.XXXXX.XXX.X...X.X.O ",
" .XXX..XXXXX..XXXX.X.XXX.O ",
" .XX.X.X...X.X.XXX.X.XXX.O ",
" .XXXX.X.X.X.XXXXX...XXX.O ",
" .XXXX.X.X.X.XXXXX...XXX.O ",
" .XXXX.......XXXXX...XXX.O ",
" .XXXXXXXXXXXXXXXXXXXXXX.O ",
" ........................O ",
" OOOOOOOOOOOOOOOOOOOOOOOO "};

40
icons/key_dir.xpm Normal file
View File

@ -0,0 +1,40 @@
/* XPM */
static char * key_xpm[] = {
"32 32 5 1",
" s None c None",
". c black",
"X c tan",
"o c wheat",
"O c gray50",
" ",
" ",
" ",
" ",
" ",
" ....... ",
" .XXXXXXX. ",
" .XXXXXXXXX. ",
" ............................ ",
" .oooooooooooooooooooooooooooo. ",
" .oooooooooooooooooooooooooooo.O",
" .oooooooooooooooooooooooooooo.O",
" .oooooooooooooooooooooooooooo.O",
" .oooooooooooooooooooooooooooo.O",
" .ooo...oooooooooooooooooooooo.O",
" .oo.ooo.ooooooooooooooooooooo.O",
" .oo.ooo.ooooooooooooooooooooo.O",
" .o..ooo.....................o.O",
" .oo.ooo.oooooooooooooo.....oo.O",
" .oo.ooo.ooooooooooooooo..o.oo.O",
" .ooo...oooooooooooooooo..o.oo.O",
" .ooooooooooooooooooooo...o..o.O",
" .oooooooooooooooooooooooooooo.O",
" .oooooooooooooooooooooooooooo.O",
" .oooooooooooooooooooooooooooo.O",
" .oooooooooooooooooooooooooooo.O",
" .oooooooooooooooooooooooooooo.O",
" .oooooooooooooooooooooooooooo.O",
" .oooooooooooooooooooooooooooo.O",
" ..............................O",
" OOOOOOOOOOOOOOOOOOOOOOOOOOOOOO",
" "};

40
icons/lharc.xpm Normal file
View File

@ -0,0 +1,40 @@
/* XPM */
static char * lharc[] = {
"32 32 5 1",
" c None s None",
"X c lemon chiffon",
". c black",
"o c tan",
"O c gray50",
" ...................... ",
" .XXXXXXXXXXXXXXXXXXXX.. ",
" .XXXXXXXXXXXXXXXXXXXX.o. ",
" .XXXXXXX............X.oo. ",
" .XXXXXXX.XX.........X.ooo. ",
" .XXXXXXX..XX........X.oooo. ",
" .XXXXXXX...XX.......X.ooooo. ",
" .XXXXXXXX...XXXX...XX.......O ",
" .XXXXXXXXX........XXXXooooo.O ",
" .XXXXXXXXXX.X..X.XXXXXooooo.O ",
" .XXXXXXX..X.X..X.X..XXXXXXX.O ",
" .XXXXXXX..X.XXXX.X..XXXXXXX.O ",
" .XXXXXXX..X.X..X.X..XXXXXXX.O ",
" .XXXXXXX..X......X..XXXXXXX.O ",
" .XXXXXXX..X..XXX.X..XXXXXXX.O ",
" .X........X.X..X.X........X.O ",
" .X........X.XXXX.X........X.O ",
" .XXXXXXX..X.X..X.X..XXXXXXX.O ",
" .XXXXXXX..X......X..XXXXXXX.O ",
" .XXXXXXX..X.XXX..X..XXXXXXX.O ",
" .XXXXXXX..X.X..X.X..XXXXXXX.O ",
" .XXXXXXX..X.XXX..X..XXXXXXX.O ",
" .XXXXXXXXXX.X..X.XXXXXXXXXX.O ",
" .XXXXXXXXX........XXXXXXXXX.O ",
" .XXXXXXXX...XXXX...XXXXXXXX.O ",
" .XXXXXXX...XX.......XXXXXXX.O ",
" .XXXXXXX..XX........XXXXXXX.O ",
" .XXXXXXX...XXXXXXX..XXXXXXX.O ",
" .XXXXXXX............XXXXXXX.O ",
" .XXXXXXXXXXXXXXXXXXXXXXXXXX.O ",
" ............................O ",
" OOOOOOOOOOOOOOOOOOOOOOOOOOOOO "};

41
icons/link.xpm Normal file
View File

@ -0,0 +1,41 @@
/* XPM */
static char * link[] = {
"32 32 6 1",
", c None s None",
" c white",
". c black",
"X c lemon chiffon",
"o c tan",
"O c gray50",
",,,,...................,,,,,,,,,",
",,,,.XXXXXXXXXXXXXXXXX..,,,,,,,,",
",,,,.XXXXXXXXXXXXXXXXX.o.,,,,,,,",
",,,,.XXXXXXXXXXXXXXXXX.oo.,,,,,,",
",,,,.XXXXXXXXXXXXXXXXX.ooo.,,,,,",
",,,,.XXXXXXXXXXXXXXXXX.oooo.,,,,",
",,,,.XXXXXXXXXXXXXXXXX......O,,,",
",,,,.XXXXXXXXXXXXXXXXXXoooo.O,,,",
",,,,.XXXXXXXXXXXXXXXXXXXooo.O,,,",
",,,,.XXXXXXXXXXXXXXXXXXXXXX.O,,,",
",,,,....XXXX.......XXXX.....O,,,",
",,,,.OOO.XX.OOOOOOO.XX.OOOO.O,,,",
",,,,...OO..OO.....OO..OO....O,,,",
",,,,.X........XXX........XX.O,,,",
",,,,..OOOOOOOO.X.OOOOOOOO.X.O,,,",
",,,,..OOOOOOOO.X.OOOOOOOO.X.O,,,",
",,,,.X........XXX........XX.O,,,",
",,,,...OO..OO.....OO..OO....O,,,",
",,,,.OOO.XX.OOOOOOO.XX.OOOO.O,,,",
",,,,....XXXX.......XXXX.....O,,,",
",,,,.XXXXXXXXXXXXXXXXXXXXXX.O,,,",
",,,,.XXXXXXXXXXXXXXXXXXXXXX.O,,,",
",,,,.XXXXXXXXXXXXXXXXXXXXXX.O,,,",
",,,,.XXXX.XXX.X.XX.X.XX.XXX.O,,,",
",,,,.XXXX.XXX.X..X.X.X.XXXX.O,,,",
",,,,.XXXX.XXX.X.X..X..XXXXX.O,,,",
",,,,.XXXX.XXX.X.XX.X.X.XXXX.O,,,",
",,,,.XXXX...X.X.XX.X.XX.XXX.O,,,",
",,,,.XXXXXXXXXXXXXXXXXXXXXX.O,,,",
",,,,.XXXXXXXXXXXXXXXXXXXXXX.O,,,",
",,,,........................O,,,",
",,,,,OOOOOOOOOOOOOOOOOOOOOOOO,,,"};

41
icons/link_bad.xpm Normal file
View File

@ -0,0 +1,41 @@
/* XPM */
static char * link_bad[] = {
"32 32 6 1",
" c None s None",
". c black",
"X c lemon chiffon",
"o c tan",
"O c gray69",
"+ c gray50",
" .X.X.X.X.X.X.X.X.X ",
" XXXXXXXXXXXXXXXXX.X ",
" .XXXXXXXXXXXXXXXXXo. ",
" XXXXXXXXXXXXXXXXX.oo. ",
" .XXXXXXXXXXXXXXXXXooo. ",
" XXXXXXXXXXXXXXXXX.oooo. ",
" .XXXXXXXXXXXXXXXXXoooooX ",
" XXXXXXXXXXXXXXXXX.X.X.X.O ",
" .XXXXXXXXXXXXXXXXooooooX+ ",
" XXXXXXXXXXXXXXXXXXooooo.O ",
" ....XXXXXXXXXXXXXXX....X+ ",
" XXXX.XXXXXXXXXXXXX.XXXX.O ",
" ...XX.XXXXXXXXXXX.XX...X+ ",
" XX........XXX........XX.O ",
" ..XXXXXXXX.X.XXXXXXXX.XX+ ",
" X.XXXXXXXX.X.XXXXXXXX.X.O ",
" .X........XXX........XXX+ ",
" X..XX.XXXXXXXXXXX.XX....O ",
" .XXX.XXXXXXXXXXXXX.XXXXX+ ",
" X...XXXXXXXXXXXXXXX.....O ",
" .XXXXXXXXXXXXXXXXXXXXXXX+ ",
" XXXXXXXXXXXXXXXXXXXXXXX.O ",
" .XXXXXXXXXXXXXXXXXXXXXXX+ ",
" XXXXX.XXX.X.XX.X.XX.XXX.O ",
" .XXXX.XXX.X..X.X.X.XXXXX+ ",
" XXXXX.XXX.X.X..X..XXXXX.O ",
" .XXXX.XXX.X.XX.X.X.XXXXX+ ",
" XXXXX...X.X.XX.X.XX.XXX.O ",
" .XXXXXXXXXXXXXXXXXXXXXXX+ ",
" XXXXXXXXXXXXXXXXXXXXXXX.O ",
" .X.X.X.X.X.X.X.X.X.X.X.X+ ",
" +O+O+O+O+O+O+O+O+O+O+O+O "};

41
icons/link_dir.xpm Normal file
View File

@ -0,0 +1,41 @@
/* XPM */
static char * link_xpm[] = {
"32 32 6 1 0 0",
" s None c None",
". c black",
"X c tan",
"o c wheat",
"O c gray50",
"+ c grey",
" ",
" ",
" ",
" ",
" ",
" ....... ",
" .XXXXXXX. ",
" .XXXXXXXXX. ",
" ........................... ",
" .ooooooooooooooooooooooooooo. ",
" .ooooooooooooooooooooooooooo.O ",
" .ooooooooooooooooooooooooooo.O ",
" .o.....oooo.......oooo.....o.O ",
" .o+++++.oo.+++++++.oo.+++++o.O ",
" .o....++..++.....++..++....o.O ",
" .oooo........ooo........oooo.O ",
" .ooo.++++++++.o.++++++++.ooo.O ",
" .ooo.++++++++.o.++++++++.ooo.O ",
" .oooo........ooo........oooo.O ",
" .o....++..++.....++..++....o.O ",
" .o+++++.oo.+++++++.oo.+++++o.O ",
" .o.....oooo.......oooo.....o.O ",
" .ooooooooooooooooooooooooooo.O ",
" .oooooo.ooo.o.oo.o.oo.oooooo.O ",
" .oooooo.ooo.o..o.o.o.ooooooo.O ",
" .oooooo.ooo.o.o..o..oooooooo.O ",
" .oooooo.ooo.o.oo.o.o.ooooooo.O ",
" .oooooo...o.o.oo.o.oo.oooooo.O ",
" .ooooooooooooooooooooooooooo.O ",
" .............................O ",
" OOOOOOOOOOOOOOOOOOOOOOOOOOOOO ",
" "};

41
icons/lock_dir.xpm Normal file
View File

@ -0,0 +1,41 @@
/* XPM */
static char * lock_dir_xpm[] = {
"32 32 6 1",
" s None c None",
". c black",
"X c tan",
"o c wheat",
"O c gray50",
"+ c gray69",
" ",
" ",
" ",
" ",
" ",
" ....... ",
" .XXXXXXX. ",
" .XXXXXXXXX. ",
" ............................ ",
" .oooo.o.ooooooooooooooo.o.ooo. ",
" .ooo.ooo.ooooooooooooo.ooo.oo.O",
" .oooo.o.ooooooooooooooo.o.ooo.O",
" .ooooo.o.o.ooooooooo.o.o.oooo.O",
" .oooooooo.o.ooooooo.o.ooooooo.O",
" .ooooooo.ooo.ooooo.ooo.oooooo.O",
" .oooooooo.o.ooooooo.o.ooooooo.O",
" .ooooooooo.o.ooooo.o.oooooooo.O",
" .oooooooooooo.....ooooooooooo.O",
" .oooooooooooo..o..ooooooooooo.O",
" .oooooooooooo.ooo.ooooooooooo.O",
" .oooooooooooo.ooo.ooooooooooo.O",
" .ooooooooooo.......oooooooooo.O",
" .ooooooooooo.......oooooooooo.O",
" .ooooooooooo.......oooooooooo.O",
" .ooooooooooo...+...oooooooooo.O",
" .ooooooooooo...+...oooooooooo.O",
" .ooooooooooo..+++..oooooooooo.O",
" .ooooooooooo.......oooooooooo.O",
" .oooooooooooooooooooooooooooo.O",
" ..............................O",
" OOOOOOOOOOOOOOOOOOOOOOOOOOOOOO",
" "};

42
icons/mail.xpm Normal file
View File

@ -0,0 +1,42 @@
/* XPM */
static char * mail[] = {
"32 32 7 1",
" c None s None",
"` c black",
"a c tan",
"b c red",
"c c white",
"d c slate grey",
"e c lemon chiffon",
" ``````````````````` ",
" `eeeeeeeeeeeeeeeee`` ",
" `eeeeeeeeeeeeeeeee`a` ",
" `eeeeeeeeeeeeeeeee`aa` ",
" `eeeeeeeeeeeeeeeee`aaa` ",
" `eeeedddeddddeeddd`aaaa` ",
" `eeeeeeeeeeeeeeeee```````",
" `eedddedddedddddeeeaaaaa`",
" `eeeeeeeeeeeeeeeeeeeeeee`",
" `eedddddeddddddeddddeeee`",
" `eeeeeeeeeeeeeeeeeeeeeee`",
" `eedddedddedddeddddeeeee`",
" `eeeeeeeeeeeeeeeeeeeeeee`",
" `aaaaaaaaaaaaaaaaaaaaaee`",
"````````````````````````````aee`",
"`eeeeeeeeeeeeeeeeeeeeeeeeee`aee`",
"`eededdddeeeeeeeeeeeeeebbbe`aee`",
"`eeeeeeeeeeeeeeeeeeeeeebbbe`aee`",
"`eedddeddeeeeeeeeeeeeeebbbe`aee`",
"`eeeeeeeeeeeeeeeeeeeeeebbbe`aee`",
"`eeeeeeeeeeeeeeeeeeeeeeeeee`aee`",
"`eeeeeeeeeeeeeeeeeeeeeeeeee`aee`",
"`eeeeeeeeeeeeeeeeeeeeeeeeee`aee`",
"`eeeeeedddeeddeddddddeeeeee`aee`",
"`eeeeeeeeeeeeeeeeeeeeeeeeee`aee`",
"`eeeeeedddddedddeddddeeeeee`aee`",
"`eeeeeeeeeeeeeeeeeeeeeeeeee`aee`",
"`eeeeeedddedddeddddddeeeeee`aee`",
"`eeeeeeeeeeeeeeeeeeeeeeeeee`aee`",
"`eeeeeeeeeeeeeeeeeeeeeeeeee`aee`",
"`eeeeeeeeeeeeeeeeeeeeeeeeee`aee`",
"````````````````````````````````"};

42
icons/mail_dir.xpm Normal file
View File

@ -0,0 +1,42 @@
/* XPM */
static char * mail_xpm[] = {
"32 32 7 1",
" s None c None",
". c black",
"X c tan",
"o c wheat",
"O c gray50",
"+ c lemon chiffon",
"@ c red",
" ",
" ",
" ",
" ",
" ",
" ....... ",
" .XXXXXXX. ",
" .XXXXXXXXX. ",
" ........................... ",
" .ooooooooooooooooooooooooooo. ",
" .ooooooooooooooooooooooooooo.O ",
" .ooooooooooooooooooooooooooo.O ",
" .ooooooooooooooooooooooooooo.O ",
" .oo.......................oo.O ",
" .oo.+++++++++++++++++++++.oo.O ",
" .oo.+++++++++++++++++@@@+.oo.O ",
" .oo.+++++++++++++++++@@@+.oo.O ",
" .oo.+++++++++++++++++@@@+.oo.O ",
" .oo.++++.++.++.++++++@@@+.oo.O ",
" .oo.+++.+.+..++.+++++++++.oo.O ",
" .oo.+++++++++++++++++++++.oo.O ",
" .oo.++++..++.++.+.+++++++.oo.O ",
" .oo.++++.+.++.+.++.++++++.oo.O ",
" .oo.+++++++++++++++++++++.oo.O ",
" .oo.+++++++++++++++++++++.oo.O ",
" .oo.......................oo.O ",
" .ooooooooooooooooooooooooooo.O ",
" .ooooooooooooooooooooooooooo.O ",
" .ooooooooooooooooooooooooooo.O ",
" .............................O ",
" OOOOOOOOOOOOOOOOOOOOOOOOOOOOO ",
" "};

42
icons/makefile.xpm Normal file
View File

@ -0,0 +1,42 @@
/* XPM */
static char * makefile[] = {
"32 32 7 1",
", c None s None",
" c white",
". c black",
"X c lemon chiffon",
"o c tan",
"O c gray50",
"+ c cyan",
",,,,..................,,,,,,,,,,",
",,,,.XXXXXXXXXXXXXXXX..,,,,,,,,,",
",,,,.XXXXXX...XXXXXXX.o.,,,,,,,,",
",,,,.XXXX... ...XXXXX.oo.,,,,,,,",
",,,,.XXXX.OO.OO.XXXXX.ooo.,,,,,,",
",,,,.XXX..O...O..XXXX.oooo.,,,,,",
",,,,.XXX.OO.OOOO.XXXX.ooooo.,,,,",
",,,,.XXX..OO.OO..XXXX.......O,,,",
",,,,.XXXX.OOOOO....XXXooooo.O,,,",
",,,,.XXXX...O....+.XX.Xoooo.O,,,",
",,,,.XXXXXX...+.+++..+.XXXX.O,,,",
",,,,.XXXXXX.++++++++++..XXX.O,,,",
",,,,.XXXXXXX.+++...+++.XXXX.O,,,",
",,,,.XXXXXXX.++.+.X.++.XXXX.O,,,",
",,,,.XXXXX..++.+.XXX.++..XX.O,,,",
",,,,.XXXXX.+++..XXXX.+++.XX.O,,,",
",,,,.XXXXX...+.+.XXX.+...XX.O,,,",
",,,,.XXXXXXX.++.+.X.++.XXXX.O,,,",
",,,,.XXXXXXX.+++...+++.XXXX.O,,,",
",,,,.XXXXXX.+++++++++++.XXX.O,,,",
",,,,.XXXXXX..+..++.....XXXX.O,,,",
",,,,.XXXX...O...++.XX.XXXXX.O,,,",
",,,,.XXXX.OO.OO....XXXXXXXX.O,,,",
",,,,.XXX..O...O..XXXXXXXXXX.O,,,",
",,,,.XXX.OO.OOOO.XXXXXXXXXX.O,,,",
",,,,.XXX..OO.OO..XXXXXXXXXX.O,,,",
",,,,.XXXX.OOOOO.XXXXXXXXXXX.O,,,",
",,,,.XXXX...O...XXXXXXXXXXX.O,,,",
",,,,.XXXXXX...XXXXXXXXXXXXX.O,,,",
",,,,.XXXXXXXXXXXXXXXXXXXXXX.O,,,",
",,,,........................O,,,",
",,,,,OOOOOOOOOOOOOOOOOOOOOOOO,,,"};

61
icons/man.xpm Normal file
View File

@ -0,0 +1,61 @@
/* XPM */
static char * manpage_xpm[] = {
"64 54 4 1 0 0",
" s None c None",
". c black",
"X c goldenrod",
"o c white",
" ",
" ",
" ... ...................................... ",
" .XX...XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.. ",
" .X.o.X.XX.XX.XX.XX.XX.XX.XX.XX.XX.XX.XX.XX.... ",
" .XX..XXX.XX.XX.XX.XX.XX.XX.XX.XX.XX.XX.XXX.... ",
" .XXX.XX.XX.XX.XX.XX.XX.XX.XX.XX.XX.XX.XX.X..... . ",
" .XX..X.XX.XX.XX.XX.XX.XX.XX.XX.XX.XX.XX.XX..o.o.o. ",
" .X.o.XXX.XX.XX.XX.XX.XX.XX.XX.XX.XX.XX.XXX.....o. ",
" .XX..XX.XX.XX.XX.XX.XX.XX.XX.XX.XX.XX.XX.X....o.o. ",
" .XXX.X.XX.XX.XX.XX.XX.XX.XX.XX.XX.XX.XX.XX.....o. ",
" .XX..XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX....o.o. ",
" .X.o.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.o...o. ",
" .XX..XX...XX...XX.......XXX...XX...XX...XX.o..o.o. ",
" .XXX.XX...XX...XX........XX...XX...XX...XX.....o. ",
" .XX..XX...XX...XX........XX...XX........XX....o.o. ",
" .X.o.XX...XX...XX...XX...XX...XXXX....XXXX.o...o. ",
" .XX..XX...XX...XX...XX...XX...XXXXX..XXXXX.o..o.o. ",
" .XXX.XX...XX...XX...XX...XX...XXXX....XXXX.o...o. ",
" .XX..XX........XX...XX...XX...XX........XX....o.o. ",
" .X.o.XX........XX...XX...XX...XX...XX...XX.....o. ",
" .XX..XXX......XXX...XX...XX...XX...XX...XX....o.o. ",
" .XXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.....o. ",
" .XX..XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX....o.o. ",
" .X.o.X.XX.XX.XX.XX.XX.XX.XX.XX.XX.XX.XX.XX.o...o. ",
" .XX..XXX.XX.XX.XX.XX.XX.XX.XX.XX.XX.XX.XXX.o..o.o. ",
" .XXX.XX.XX.XX.XX.XX.XX.XX.XX.XX.XX.XX.XX.X..o..o. ",
" .XX..X.XX.XX.XX.XX.XX.XX.XX.XX.XX.XX.XX.XX..o.o.o. ",
" .X.o.XXX.XX.XX.XX.XX.XX.XX.XX.XX.XX.XX.XXX..o..o. ",
" .XX..XX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.X.o..o.o. ",
" .XXX.X.XXX.X.XXX..XXX..XX.XX.XX..XX.XXX.XX.....o. ",
" .XX..XXXX.X.X.X.XX.X.XX.X.XX.X.XX.X.XXXXXX..o.o.o. ",
" .X.o.XX.X.XXX.X....X.XX.X.XX.X....X.XXXX.X.o...o. ",
" .XX..X.XX.XXX.X.XX.X.XX.X.XX.X.XX.X.XXX.XX....o.o. ",
" .XXX.XXXX.XXX.X.XX.X.XX.XX..XX.XX.X...XXXX.....o. ",
" .XX..XX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.X....o.o. ",
" .X.o.X.XX.XX.XX.XX.XX.XX.XX.XX.XX.XX.XX.XX.....o. ",
" .XX..XXX.XX.XX.XX.XX.XX.XX.XX.XX.XX.XX.XXX.o..o.o. ",
" .XXX.XX.XX.XX.XX.XX.XX.XX.XX.XX.XX.XX.XX.X..o..o. ",
" .XX..X.XX.XX.XX.XX.XX.XX.XX.XX.XX.XX.XX.XX.o..o.o. ",
" .X.o.XXX.XX.XX.XX.XX.XX.XX.XX.XX.XX.XX.XXX.o...o. ",
" .XX..XX.XX.XX.XX.XX.XX.XX.XX.XX.XX.XX.XX.X.o..o.o. ",
" .XXX.X.XX.XX.XX.XX.XX.XX.XX.XX.XX.XX.XX.XX.o...o. ",
" .XX..XXX.XX.XX.XX.XX.XX.XX.XX.XX.XX.XX.XXX....o.o. ",
" .X.o.XX.XX.XX.XX.XX.XX.XX.XX.XX.XX.XX.XX.X.....o. ",
" .XX..X.XX.XX.XX.XX.XX.XX.XX.XX.XX.XX.XX.XX..o.o.o. ",
" .XXX..XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...o..o. ",
" ...o.......................................o.o.o. ",
" .ooo.o.o......ooo....ooo..o...........oo.o.....o. ",
" .ooo..o.o.o.........o.o.....o.............o...o.o. ",
" ..............................................o. ",
" .o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o. ",
" .o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o. ",
" .o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o. "};

41
icons/music.xpm Normal file
View File

@ -0,0 +1,41 @@
/* XPM */
static char * music[] = {
"32 32 6 1",
" c None s None",
". c black",
"X c lemon chiffon",
"o c tan",
"O c gray50",
"+ c wheat",
" .................. ",
" .XXXXXXXXXXXXXXXX.. ",
" .XXXXXXXXXX.XXXXX.o. ",
" .XXXXXXXXXX..XXXX.oo. ",
" .XXXXXXXXXX....XX.ooo. ",
" .XXXXXXXXXX.....X.oooo. ",
" .XXXXXXXXXX.....X.ooooo. ",
" .XXXXXXXXXX.XX..........O ",
" .XXXXXXXXXX.XXX..+ooooo.O ",
" .XXXXXXXXXX.XXXX..+oooo.O ",
" .XXXXXXXXXX.XXXXX..XXXX.O ",
" .XXXXXXXXXX.XXXXX...XXX.O ",
" .XXXXXXXXXX.XXXXXX..XXX.O ",
" .XXXXXXXXXX.XXXXXX..XXX.O ",
" .XXXXXXXXXX.XXXXXX..XXX.O ",
" .XXXXXXXXXX.XXXXXX..XXX.O ",
" .XXXXXXXXXX.XXXXX..XXXX.O ",
" .XXXXXXXXXX.XXXXX.XXXXX.O ",
" .XXXXXXXXXX.XXXX.XXXXXX.O ",
" .XXXXXXXXXX.XXX.XXXXXXX.O ",
" .XXXXXXXXXX.XX.XXXXXXXX.O ",
" .XXXXX....X.XXXXXXXXXXX.O ",
" .XXX........XXXXXXXXXXX.O ",
" .XX.........XXXXXXXXXXX.O ",
" .X..........XXXXXXXXXXX.O ",
" .X..........XXXXXXXXXXX.O ",
" .X.........XXXXXXXXXXXX.O ",
" .XX.......XXXXXXXXXXXXX.O ",
" .XXX.....XXXXXXXXXXXXXX.O ",
" .XXXXXXXXXXXXXXXXXXXXXX.O ",
" ........................O ",
" OOOOOOOOOOOOOOOOOOOOOOOO "};

41
icons/network_dir.xpm Normal file
View File

@ -0,0 +1,41 @@
/* XPM */
static char * network_xpm[] = {
"32 32 6 1 0 0",
" s None c None",
". c black",
"X c tan",
"o c wheat",
"O c gray50",
"+ c grey",
" ",
" ",
" ....... ",
" .XXXXXXX. ",
" .XXXXXXXXX. ",
" ........................... ",
" .ooooooooooooooooooooooooooo. ",
" .ooooooooooooooooooooooooooo.O ",
" .ooooooooooooooooooooooooooo.O ",
" .ooooooooooooooooooooooooooo.O ",
" .ooooooooooooooooooooooooooo.O ",
" .ooooooooooooooooooooooooooo.O ",
" .ooooooooooooooooooooooooooo.O ",
" .ooooooooooooooooooooooooooo.O ",
" .ooooooooooooooooooooooooooo.O ",
" .ooooooooooooooooooooooooooo.O ",
" .ooooooooooooooooooooooooooo.O ",
" .ooooooooooooooooooooooooooo.O ",
" .ooooooooooooooooooooooooooo.O ",
" .ooooooooooooooooooooooooooo.O ",
" .ooooooooooooooooooooooooooo.O ",
" .ooooooooooooooooooooooooooo.O ",
" .ooooooooooooooooooooooooooo.O ",
" .ooooooooooooooooooooooooooo.O ",
" .oooooo.+.oooooooooooooooooo.O ",
" .oooooo.+.oooooooooooooooooo.O ",
" .....o.....o.................O ",
" OOOOO.+++.OOOOOOOOOOOOOOOOOOO ",
" ..... ",
". .. ..++.++............... .. .",
"+ ++ +++. .++++++++++++++++ ++ +",
". .. ... ................ .. ."};

41
icons/news_dir.xpm Normal file
View File

@ -0,0 +1,41 @@
/* XPM */
static char * news_dir_xpm[] = {
"32 32 6 1",
" s None c None",
". c black",
"X c tan",
"o c wheat",
"O c gray50",
"+ c white",
" ",
" ",
" ",
" ",
" ",
" ....... ",
" .XXXXXXX. ",
" .XXXXXXXXX. ",
" ........................... ",
" .ooooooooooooooooooooooooooo.O ",
" .ooooooooooooooooooooooooooo.O ",
" .ooo.....................ooo.O ",
" .oo..+++.+++.++++.++++.++.oo.O ",
" .o...+.+.+..+.+.+.+..++.+.oo.O ",
" .o.+.++..++.+.+..+.+.+..++.o.O ",
"...+.+.+++++++++++++++++++++.OO ",
".+++.+.+................+..+..O ",
" ..+.+.++++++++++++++++++++++.O ",
" ..++.+.+.+.+..+...++.+.....+.O ",
" .+.+.+.++.+.+.+++++++.+..+..+. ",
" o..++.+.+......+.++...+.....+. ",
" ..+.+.+.++..+..+++++++++.+..+..",
" .o..++.+.+......++.+...+.....+.",
" .o.+.+.+.++...+..+...+.+..+..+.",
" .oo..++.+.+..+...+.+...+.....+.",
" .oo...+.+.+....+.+.....+..+++. ",
" .oo.+...+.+..+...............O ",
" .ooo...........ooooooooooooo.O ",
" .ooooooooooooooooooooooooooo.O ",
" .............................O ",
" OOOOOOOOOOOOOOOOOOOOOOOOOOOOO ",
" "};

Some files were not shown because too many files have changed in this diff Show More