| 1 |
==================================== |
|---|
| 2 |
Package "Date::Calc" Version 5.3 |
|---|
| 3 |
==================================== |
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
Copyright (c) 1995 - 2002 by Steffen Beyer. |
|---|
| 7 |
All rights reserved. |
|---|
| 8 |
|
|---|
| 9 |
|
|---|
| 10 |
Tools: |
|---|
| 11 |
------ |
|---|
| 12 |
|
|---|
| 13 |
You will find various tools in the "tools" subdirectory of this |
|---|
| 14 |
distribution: |
|---|
| 15 |
|
|---|
| 16 |
tools/compile.bat |
|---|
| 17 |
tools/compile.pl |
|---|
| 18 |
tools/compile.sh |
|---|
| 19 |
|
|---|
| 20 |
tools/iso2pc.c |
|---|
| 21 |
tools/pc2iso.c |
|---|
| 22 |
|
|---|
| 23 |
|
|---|
| 24 |
compile.bat, compile.pl, compile.sh: |
|---|
| 25 |
------------------------------------ |
|---|
| 26 |
|
|---|
| 27 |
These tools are simple shortcuts to reduce the amount of typing required |
|---|
| 28 |
to compile one or more C sources where the use of a "Makefile" would be |
|---|
| 29 |
an overkill. |
|---|
| 30 |
|
|---|
| 31 |
They are an ideal place to lay down often-used compiler options, in order |
|---|
| 32 |
to make manual compiles a little less cumbersome. |
|---|
| 33 |
|
|---|
| 34 |
The first parameter of these tools is always the name of the source file |
|---|
| 35 |
to be compiled, which will also be the name of the resulting output file. |
|---|
| 36 |
|
|---|
| 37 |
This is usually the C source containing the "main()" function. |
|---|
| 38 |
|
|---|
| 39 |
In the case of "compile.pl" and "compile.sh", the filename extension ".c" |
|---|
| 40 |
is optional for this first parameter. |
|---|
| 41 |
|
|---|
| 42 |
In the case of "compile.bat", the filename extension ".c" must NOT be |
|---|
| 43 |
specified for this first parameter. |
|---|
| 44 |
|
|---|
| 45 |
All other parameters are optional and are simply passed through to the |
|---|
| 46 |
compiler, exactly as they are. |
|---|
| 47 |
|
|---|
| 48 |
Usually, these parameters will be additional C sources to be compiled |
|---|
| 49 |
and linked with the resulting output file, or additional compiler |
|---|
| 50 |
options. |
|---|
| 51 |
|
|---|
| 52 |
(The proper filename extension (".c", ".o" etc.) is mandatory for these |
|---|
| 53 |
additional file names!) |
|---|
| 54 |
|
|---|
| 55 |
When invoked without parameters, all three tools print a usage and exit. |
|---|
| 56 |
|
|---|
| 57 |
Note that "compile.bat" assumes "cl" to be your (ANSI) C compiler, |
|---|
| 58 |
"compile.pl" will use the same compiler as the one Perl itself has |
|---|
| 59 |
been compiled with (or which Perl has been configured to use), and |
|---|
| 60 |
"compile.sh" assumes "gcc". |
|---|
| 61 |
|
|---|
| 62 |
If this is not what you have, adapt these little scripts accordingly! |
|---|
| 63 |
|
|---|
| 64 |
You will most probably want to use these tools in order to compile the |
|---|
| 65 |
program "cal.c" from the "examples" subdirectory of this distribution |
|---|
| 66 |
(see the file "EXAMPLES.txt" in this distribution for details) or to |
|---|
| 67 |
compile the "iso2pc.c" and "pc2iso.c" pair of filters (see the section |
|---|
| 68 |
immediately below for more details). |
|---|
| 69 |
|
|---|
| 70 |
|
|---|
| 71 |
iso2pc.c, pc2iso.c: |
|---|
| 72 |
------------------- |
|---|
| 73 |
|
|---|
| 74 |
This pair of tools is a complementary set of filters designed to convert |
|---|
| 75 |
special characters (with ASCII codes ranging from 0x80 to 0xFF) from the |
|---|
| 76 |
"ISO-Latin-1" (= "ISO-8859-1") character set to one of the "CP 850" PC |
|---|
| 77 |
character sets (and vice-versa) in a REVERSIBLE way and WITHOUT LOSSES |
|---|
| 78 |
of information. |
|---|
| 79 |
|
|---|
| 80 |
This is useful on systems (such as MS-DOS or the FreeBSD console, |
|---|
| 81 |
to name just two) which cannot display the ISO-Latin-1 character set. |
|---|
| 82 |
|
|---|
| 83 |
Please look into these two files themselves for a more complete |
|---|
| 84 |
documentation and a description of their various command line options. |
|---|
| 85 |
|
|---|
| 86 |
In order to compile these two programs, you can use the "compile.*" |
|---|
| 87 |
scripts from the "tools" subdirectory of this distribution (for a |
|---|
| 88 |
description of these tools, see the first section in this document |
|---|
| 89 |
above). |
|---|
| 90 |
|
|---|
| 91 |
Simply change directory to the "tools" subdirectory and enter one |
|---|
| 92 |
pair of the following commands: |
|---|
| 93 |
|
|---|
| 94 |
% perl compile.pl iso2pc (UNIX or Win32) |
|---|
| 95 |
% perl compile.pl pc2iso (UNIX or Win32) |
|---|
| 96 |
|
|---|
| 97 |
% ./compile.sh iso2pc (UNIX only) |
|---|
| 98 |
% ./compile.sh pc2iso (UNIX only) |
|---|
| 99 |
|
|---|
| 100 |
% compile iso2pc (MS-DOS/Windows only) |
|---|
| 101 |
% compile pc2iso (MS-DOS/Windows only) |
|---|
| 102 |
|
|---|
| 103 |
Note that these two filters are not confined to UNIX or Windows NT/95 |
|---|
| 104 |
platforms, they also compile and run perfectly well on pure MS-DOS or |
|---|
| 105 |
other Windows systems (or wherever a standard ANSI C compiler and |
|---|
| 106 |
redirection of standard input and output are available)! |
|---|
| 107 |
|
|---|
| 108 |
In order to be able to use these filters later more easily, you should |
|---|
| 109 |
copy the resulting executables ("iso2pc" and "pc2iso" or "iso2pc.exe" |
|---|
| 110 |
and "pc2iso.exe") to some directory in your search path; for example |
|---|
| 111 |
to "/usr/local/bin" (UNIX) or "C:\DOS" (MS-DOS/Windows). |
|---|
| 112 |
|
|---|
| 113 |
These two filters are included in this package in case you want to display |
|---|
| 114 |
this module's output on a terminal which cannot display the ISO-Latin-1 |
|---|
| 115 |
character set, but uses the CP850 character set (MS-DOS, SCO console under |
|---|
| 116 |
FreeBSD) or the Microsoft Windows character set instead. |
|---|
| 117 |
|
|---|
| 118 |
For this, simply pipe this module's output through the "iso2pc" filter: |
|---|
| 119 |
|
|---|
| 120 |
% perl myscript | iso2pc # for MS-DOS/SCO console |
|---|
| 121 |
% perl myscript | iso2pc -win # for Windows |
|---|
| 122 |
|
|---|
| 123 |
Note that the option "-rev" reverses this transformation: |
|---|
| 124 |
|
|---|
| 125 |
% perl myscript | iso2pc | iso2pc -rev |
|---|
| 126 |
% perl myscript | iso2pc -win | iso2pc -win -rev |
|---|
| 127 |
|
|---|
| 128 |
yields the original text! |
|---|
| 129 |
|
|---|
| 130 |
Note also that "iso2pc -rev" is the same as "pc2iso" and vice-versa, i.e., |
|---|
| 131 |
"pc2iso -rev" is exactly the same as "iso2pc" - provided that you always |
|---|
| 132 |
use the identical "-dos" (default) or "-win" flag setting, as shown above! |
|---|
| 133 |
|
|---|
| 134 |
|
|---|