Dec 072017
Elm mail reader source code in OS/2. | |||
---|---|---|---|
File Name | File Size | Zip Size | Zip Type |
CHANGES | 1538 | 803 | deflated |
CONFIG.H | 13705 | 3999 | deflated |
CONFIGUR | 94928 | 25502 | deflated |
CRYPT | 0 | 0 | stored |
CRYPT.C | 3508 | 1114 | deflated |
CRYPT_UT.C | 26776 | 7397 | deflated |
PATCHLEV.H | 984 | 525 | deflated |
README | 7596 | 3201 | deflated |
UFC-CRYP.H | 2589 | 1010 | deflated |
DOC | 0 | 0 | stored |
ALIAS.GUI | 16518 | 6372 | deflated |
ANSWER.1 | 2106 | 1079 | deflated |
AUTOREPL.1 | 2055 | 1081 | deflated |
CHECKALI.1 | 1142 | 647 | deflated |
CONFIG.GUI | 11633 | 4599 | deflated |
ELM.1 | 4188 | 1756 | deflated |
ELM.COV | 1201 | 659 | deflated |
FASTMAIL.1 | 3294 | 1512 | deflated |
FILTER.1 | 3335 | 1447 | deflated |
FILTER.GUI | 17426 | 6497 | deflated |
FORM.GUI | 11494 | 4351 | deflated |
FRM.1 | 1083 | 618 | deflated |
LISTALIA.1 | 989 | 576 | deflated |
MAKEFILE | 5548 | 1433 | deflated |
MESSAGES.1 | 711 | 443 | deflated |
NEWALIAS.1 | 2382 | 1110 | deflated |
NEWMAIL.1 | 4985 | 2124 | deflated |
PRINTMAI.1 | 982 | 585 | deflated |
READMSG.1 | 3860 | 1779 | deflated |
REF.GUI | 62012 | 19733 | deflated |
TMAC.N | 25892 | 7722 | deflated |
USERS.GUI | 34354 | 12284 | deflated |
WNEWMAIL.1 | 1720 | 935 | deflated |
FILES.BIN | 960 | 290 | deflated |
FILES.SRC | 2258 | 745 | deflated |
FILTER | 0 | 0 | stored |
ACTIONS.C | 8353 | 2784 | deflated |
BUFFER.C | 897 | 399 | deflated |
FILTER.C | 9954 | 3535 | deflated |
LOCK.C | 4558 | 1790 | deflated |
MAKEFILE | 2040 | 754 | deflated |
PARSE.C | 10561 | 2880 | deflated |
RULES.C | 9161 | 2730 | deflated |
SUMMARIZ.C | 5519 | 1976 | deflated |
UTILS.C | 4296 | 1601 | deflated |
HDRS | 0 | 0 | stored |
CURSES.H | 1318 | 554 | deflated |
DEFS.H | 12057 | 4594 | deflated |
ELM.H | 8483 | 2832 | deflated |
FILTER.H | 5739 | 2056 | deflated |
HEADERS.H | 8528 | 2712 | deflated |
PATCHLEV.H | 23 | 23 | stored |
SAVE_OPT.H | 3776 | 1231 | deflated |
SYSDEFS.H | 4691 | 1823 | deflated |
INSTRUCT | 4488 | 2129 | deflated |
MAKEFILE | 2770 | 1148 | deflated |
OS2 | 0 | 0 | stored |
ALARM.C | 4233 | 1728 | deflated |
ALARM.H | 69 | 64 | deflated |
ELM.DEF | 82 | 82 | stored |
GETOPT.C | 2598 | 1169 | deflated |
OS2ELM.H | 751 | 306 | deflated |
OS2UTIL.C | 7964 | 2282 | deflated |
PWD.H | 197 | 124 | deflated |
TERMCAP.C | 8113 | 2556 | deflated |
TERMCAP.DAT | 4447 | 1395 | deflated |
TERMCAP.H | 1077 | 456 | deflated |
TERMIOS.H | 312 | 179 | deflated |
OVERVIEW | 4742 | 2258 | deflated |
PATCHES.OS2 | 162043 | 34926 | deflated |
PATCHLIS | 9706 | 4324 | deflated |
README | 8037 | 3490 | deflated |
README.OS2 | 12301 | 4507 | deflated |
SRC | 0 | 0 | stored |
ADDR_UTI.C | 34734 | 11162 | deflated |
ALIAS.C | 19478 | 4888 | deflated |
ALIASDB.C | 10005 | 3545 | deflated |
ALIASLIB.C | 10472 | 3547 | deflated |
ARGS.C | 6630 | 2420 | deflated |
BOUNCEBK.C | 3402 | 1355 | deflated |
BUILTIN.C | 9541 | 3492 | deflated |
CALENDAR.C | 4439 | 1792 | deflated |
CONN_TO.C | 3474 | 1310 | deflated |
CURSES.C | 21148 | 6366 | deflated |
DATE.C | 8337 | 2676 | deflated |
DELETE.C | 3665 | 1102 | deflated |
DOMAINS.C | 9308 | 3214 | deflated |
EDIT.C | 6485 | 2396 | deflated |
EDITMSG.C | 20820 | 6057 | deflated |
ELM.C | 23879 | 6153 | deflated |
ENCODE.C | 5375 | 2033 | deflated |
ERRNO.C | 3354 | 1397 | deflated |
EXITPROG.C | 1677 | 791 | deflated |
EXPIRES.C | 4111 | 1536 | deflated |
FILE.C | 11141 | 3734 | deflated |
FILEIO.C | 12786 | 3708 | deflated |
FILE_UTI.C | 9915 | 3131 | deflated |
FORMS.C | 10055 | 3406 | deflated |
HDRCONFG.C | 9857 | 3064 | deflated |
HELP.C | 9176 | 2843 | deflated |
INIT.C | 13631 | 4923 | deflated |
IN_UTILS.C | 13633 | 3735 | deflated |
LEAVEMBO.C | 31384 | 8446 | deflated |
LIMIT.C | 9041 | 2645 | deflated |
MAILMSG1.C | 10766 | 3664 | deflated |
MAILMSG2.C | 30525 | 9333 | deflated |
MAILTIME.C | 2599 | 881 | deflated |
MAKEFILE | 4462 | 1260 | deflated |
MKHDRS.C | 3912 | 1541 | deflated |
NEWMBOX.C | 28327 | 7552 | deflated |
OPTIONS.C | 11880 | 3899 | deflated |
OPT_UTIL.C | 10145 | 3530 | deflated |
OUT_UTIL.C | 2985 | 1041 | deflated |
PATTERN.C | 6849 | 2254 | deflated |
PMALLOC.C | 2102 | 951 | deflated |
QUIT.C | 5667 | 1936 | deflated |
READ_RC.C | 27880 | 7443 | deflated |
REMAIL.C | 4617 | 1850 | deflated |
REPLY.C | 16492 | 4992 | deflated |
RETURNAD.C | 13277 | 4123 | deflated |
SAVECOPY.C | 7365 | 2557 | deflated |
SAVE_OPT.C | 11480 | 3733 | deflated |
SCREEN.C | 13041 | 4584 | deflated |
SHOWMSG.C | 15550 | 5197 | deflated |
SHOWMSG_.C | 9655 | 2840 | deflated |
SIGNALS.C | 3564 | 1249 | deflated |
SOFTKEYS.C | 3566 | 1166 | deflated |
SORT.C | 7893 | 2667 | deflated |
STRING2.C | 4671 | 1841 | deflated |
STRINGS.C | 15727 | 5443 | deflated |
SYSCALL.C | 11894 | 4312 | deflated |
UTILS.C | 9186 | 2750 | deflated |
VALIDNAM.C | 1712 | 750 | deflated |
TEST | 0 | 0 | stored |
TEST.EMP | 0 | 0 | stored |
TEST.MAI | 10330 | 4074 | deflated |
UTILS | 0 | 0 | stored |
ANSWER.C | 10618 | 3845 | deflated |
AREPDAEM.C | 17707 | 5834 | deflated |
AUTOREPL.C | 6006 | 2102 | deflated |
CHECKALI | 224 | 173 | deflated |
EXPAND.C | 4285 | 1712 | deflated |
FASTMAIL.C | 9739 | 3509 | deflated |
FROM.C | 10847 | 3643 | deflated |
LISTALIA.C | 2842 | 1209 | deflated |
MAILRC.AWK | 1381 | 595 | deflated |
MAKEFILE | 3952 | 1208 | deflated |
MESSAGES | 550 | 290 | deflated |
NEWALIAS.C | 17533 | 5941 | deflated |
NEWMAIL.C | 21428 | 7112 | deflated |
PRINTMAI | 372 | 236 | deflated |
READMSG.C | 14073 | 4589 | deflated |
Download File ELM23SRC.ZIP Here
Contents of the README file
UFC-crypt: ultra fast 'crypt' implementation
============================================
@(#)README2.19 5/19/92
Design goals/non goals:
----------------------
- Crypt implementation plugin compatible with crypt(3)/fcrypt.
- High performance when used for password cracking.
- Portable to most 32/64 bit machines.
- Startup time/mixed salt performance not critical.
Features of the implementation:
------------------------------
- On most machines, UFC-crypt runs 30-60 times faster than crypt(3) when
invoked repeated times with the same salt and varying passwords.
- With mostly constant salts, performance is about two to three times
that of the default fcrypt implementation shipped with Alec
Muffets 'Crack' password cracker. For instructions on how to
plug UFC-crypt into 'Crack', see below.
- With alternating salts, performance is only about twice
that of crypt(3).
- Tested on 680x0, 386, SPARC, MIPS, HP-PA, Convex, Cray,
Pyramid and IBM RS/6000 systems as well as with gcc on IBM PS/2(DOS)
and Linux on a 386 PC.
- Requires 165 kb for tables.
- UFC-crypt is known to have compilation problems with some micro computer
C compilers (e.g. Turbo C++) due to its table sizes. Flame the vendors
for placing arbitrary limitations on their products. Use & support the
GNU C compiler, gcc.
- Also includes 'fcrypt16' - the function used with DEC's enhanced
security setup.
Author & licensing etc
----------------------
UFC-crypt is created by Michael Glad, email: [email protected], and has
been donated to the Free Software Foundation, Inc. It is covered by the
GNU library license version 2, see the file 'COPYING'.
Installing UFC-crypt
--------------------
Installing as part of the GNU C Library:
***************************************
Unpack UFC-crypt and move the directory holding the sources into the
C library source directory as 'crypt'.
UNIX install
************
Edit the Makefile setting the variables
CRYPT:The encryption module to use; crypt.o should always work.
If compiling for one of the machines for which special support
is available, select the appropriate module.
CC:The compiler to use.
OFLAGS: The highest level of optimization available.
Now run 'make'. UFC-crypt is compiled into 'libufc.a'. A test program: ufc
is also linked. Try it out: './ufc 1' to test proper operation.
For a more thorough test, run 'make tests'. This compiles and invokes
a DES validation suite as well as two benchmark programs comparing
UFC-crypt with the native crypt(3) implementation.
If your friendly vendor has omitted crypt(3) from libc, compilation of
the native benchmark program 'speedc' will fail. Compilation of the
'speed*' programs may also fail as they use timer facilities not present
in the same form in all UNIX implementations. If so is, you may choose to
run '/bin/time ./ufc 10000' and divide the CPU time used by 10000.
'libufc.a' can be linked into your applications. It is compatible with
both crypt(3) and the fcrypt shipped with Alec Muffett's Crack program.
DOS install
***********
UFC-crypt compiles under DOS at least with MSC 6.00A. To compile,
move 'patchlevel.h' to 'pl.h', 'ufc-crypt.h' to 'ufc.h' and 'crypt_util.c'
to 'cryptutl.c'. When compiling, define the macro 'DOS' ( -DDOS ).
You should compile & link the programs by hand. Refer to the Makefile to
see which modules is needed for a program. You should be able to compile &
run the verification programs 'cert' and 'ufc' but not the benchmark program
'speedf'. For benchmarking, measure the running time of 'ufc 10000'.
Having compiled the modules, you can link 'cryptutl.o' and 'crypt.o' into
your application programs or put them into a library.
Installing UFC-crypt into Crack:
*******************************
Crack Release 4.0a: in 'Sources/Makefile', change the CRACKCRYPT macro
to a path leading to 'libufc.a' and invoke the Crack
script as usual.
4.1 and later: Crack knows about UFC-crypt. Refer to the Crack docs
for instructions.
Benchmark table:
---------------
The table shows how many operations per second UFC-crypt can
do on various machines.
|--------------|-------------------------------------------|
|Machine | SUN* SUN* HP* DecStation HP |
| | 3/50 ELC 9000/425e 3100 9000/720 |
|--------------|-------------------------------------------|
| Crypt(3)/sec | 4.6 30 15 25 57 |
| Ufc/sec | 220 990 780 1015 3500 |
|--------------|-------------------------------------------|
| Speedup | 48 30 52 40 60 |
|--------------|-------------------------------------------|
*) Compiled using special assembly language support module.
It seems as if performance is limited by CPU bus and data cache capacity.
This also makes the benchmarks debatable compared to a real test with
UFC-crypt wired into Crack. However, the table gives an outline of
what can be expected.
Optimizations:
-------------
Here are the optimizations used relative to an ordinary implementation
such as the one said to be used in crypt(3).
Major optimizations
*******************
- Keep data packed as bits in integer variables -- allows for
fast permutations & parallel xor's in CPU hardware.
- Let adjacent final & initial permutations collapse.
- Keep working data in 'E expanded' format all the time.
- Implement DES 'f' function mostly by table lookup
- Calculate the above function on 12 bit basis rather than 6
as would be the most natural.
- Implement setup routines so that performance is limited by the DES
inner loops only.
Minor (dirty) optimizations
***************************
- combine iterations of DES inner loop so that DES only loops
8 times. This saves a lot of variable swapping.
- Implement key access by a walking pointer rather than coding
as array indexing.
- As described, the table based f function uses a 3 dimensional array:
sb ['number of 12 bit segment']['12 bit index']['48 bit half index']
Code the routine with 4 (one dimensional) vectors.
- Design the internal data format & uglify the DES loops so that
the compiler does not need to do bit shifts when indexing vectors.
Portability issues
******************
UFC-crypt does not need to know the byte endianness of the machine is runs on.
To speed up the DES inner loop, it does a dirty trick requiring the
availability of a integer flavoured data type occupying exactly 32 (or 64)
bits. This is normally the case of 'long'. The header file 'ufc-crypt.h'
contains typedefs for this type. If you have to change it (or any other part)
to get things working, please drop me a note.
UFC-crypt can take advantage of 64 bit integers. At the moment, it is
configured to do so automatically for Convex & Cray machines.
Revision history
****************
UFC patchlevel 0: base version; released to alt.sources on Sep 24 1991
UFC patchlevel 1: patch released to alt.sources on Sep 27 1991.
No longer rebuilds sb tables when seeing a new salt.
UFC-crypt pl0: Essentially UFC pl 1. Released to comp.sources.misc
on Oct 22 1991.
UFC-crypt pl1: Released to comp.sources.misc in march 1992
* setkey/encrypt routines added
* added validation/benchmarking programs
* reworked keyschedule setup code
* memory demands reduced
* 64 bit support added
This is the 2.3 (USENET) version of the Elm Mail System
See the NOTICE and Instruct files for further details.
It is IMPERITIVE that all users rerun newalias after installing
Elm 2.3 when upgrading from a previous version. Elm's behavoir
with aliases could be unpredictible if this step is not performed.
Where to find more info on Elm:
Much discussion on Elm including interim bug fixes, work arounds
and future plans occurs in the Usenet news group comp.mail.elm. Also
a monthly status report on Elm is posted there. This status report
lists the archive sites that have the patches to Elm as well as the
lastest version.
Patches to Elm are posted to comp.mail.elm and comp.sources.bugs as
soon as they are released. They are posted to comp.sources.unix shortly
thereafter, to allow time for feedback of problems in the patches.
Patches should be available from the archive sites, or from the
archive server. Mail [email protected] for details on how to
use the archive server program. Ask it for help.
Limitations/Problems you might encounter in compiling and installing Elm:
On some Unix 5.3.2 systems, if only a runtime version of the
O/S has been installed, not all the include files exist for compiling
curses.c. The ptem.h include file contains the window sizing structure
on this version. Either comment out the window sizing code, or install
the remaining include files from the development system.
If you run a nonstandard configuration of Mail, such as Xenix
running smail, Configure can get confused as to where to place items.
Be sure and check the config.sh file for the correct placement before
continuning. If changes are necessary, rerun Configure and fix the
file before exiting.
On SCO Xenix, if you are all mail is from user anonymous,
this is because the mail delivery agent should be
/usr/lib/mail/execmail instead of /usr/bin/rmail or /bin/rmail.
On Next's it is necessary to answer -bsd for the
Any additional cc flags? question and -lsys_s for the
Any additional libraries? question within Configure.
On some systems, especially those based on the AT&T Port to
286's the -O flag of the compiler produces improper code causing
segmentation violations. If this happens, recompile the code without
the -O flag. This has been seen with Microport SysV/AT type systems.
The Configuration script has been known to exceed the default
stack size in Unix 286 sh's. If Configure does not run correctly on
this type of machine increase the stack size and rerun it. On
Microport SysV/AT machines, Configure might run correctly under ksh.
Obtain ksh from Microport (available to current version owners without
additional charge) and rerun Configure using it. Xenix 286 users may
have the same problem, but they can work around it by changing the
stack size within the shell as reported a Xenix 286 Elm user:
> I had the same problems as everyone else is reporting on Microports *nix under
> SCO XENIX 2.2.1.
>
> The solution is simple, up the stack size for /bin/sh. I used
>
> # mv /bin/sh /bin/sh.old
> # cp /bin/sh.old /bin/sh
> # fixhdr -F 8000 /bin/sh
>
> This may seem a bit over the top, but I put it back after!
>
> # mv /bin/sh /bin/sh.rm
> # mv /bin/sh.old /bin/sh
>
> Then wait till nobody is using /bin/sh.rm then
>
> # rm /bin/sh.rm
>
> That way you preserve your old shell, ( ie you don't break it ), but you
> get to use Configure without bus errors etc.
>
> I hope that of use
>
> Keith
> --
> UUCP ..!uunet!mcvax!ukc!slxsys!g4lzv!keith | Keith Brazington
> Smart mail [email protected] | 5b Northgate Rochester Kent UK
> Ampanet [44.131.8.1] and [44.131.8.3] | +44 634 811594 Voice
> Packet G4LZV @ GB7UWS -- G4LZV USENET BB --| +44 634 401210 Data v22,v22bis
You might have to experiment and try values from 7000 to 8800.
Also on Microport SysV/AT Machines, the C compiler produces
improper code for one of the arithmetic calls. To fix this problem it
is necessary to reduce the complexity of the statement, as reported by
one of our testers here is the symptom and his patch. Being this is a
compiler bug on only one system, we make the information available, but
not incorporate it in the main release. Note, this may effect other
areas of Elm, and in the future, Microport may even fix this problem.
> I finally tracked down the bug that was causing the lengthy delays when
> the first message was displayed. The Microport 80286 C compiler was
> generating bad code for the computation of padding in showmsg.c. The
> compiler generated scratch variables in the expression were being
> located at weird offsets in the stack segment. This caused the program
> to stall while the kernel attempted to grow the stack segment to a size
> that was large enough to contain the scratch variables. This explains
> why it only happened the first time a message was displayed. Here is a
> patch that fixes the problem:
>
> *** showmsg.c.distFri Mar 17 21:08:37 1989
> --- showmsg.cSat Mar 18 06:14:04 1989
> ***************
> *** 280,289
> atoi(current_header->year), current_header->time);
>
> /* truncate or pad title2 portion on the right
> ! * so that line fits exactly */
> ! padding =
> ! COLUMNS -
> ! (strlen(title1) + (buf_len=strlen(title2)) + strlen(title3));
>
> sprintf(titlebuf, "%s%-*.*s%s\n", title1, buf_len+padding,
> buf_len+padding, title2, title3);
>
> --- 280,292 -----
> atoi(current_header->year), current_header->time);
>
> /* truncate or pad title2 portion on the right
> ! * so that line fits exactly, expression has been
> ! * simplified to avoid bug in Microport 80286
> ! * C compiler */
> ! padding = COLUMNS;
> ! padding -= strlen(title1);
> ! padding -= (buf_len = strlen(title2));
> ! padding -= strlen(title3);
>
> sprintf(titlebuf, "%s%-*.*s%s\n", title1, buf_len+padding,
> buf_len+padding, title2, title3);
>
> --
> John A. Limpert
> UUCP:[email protected], [email protected], uunet!n3dmc!johnl
Some versions of GNUmake are slightly incompatible with
standard make. If you plan on using GNUmake instead of standard make,
you might need to change instances of:
-$(MAKEFLAGS)
to:
$(MAKEFLAGS)
in all Makefiles that contain that construct.
>From pyrdc!uunet!mcvax!sauna.hut.fi!jkp Thu Jul 20 23:06:10 1989
>From: Jyrki Kuoppala
>Subject: ELM diff for Altos Worknet
>Organization: Helsinki University of Technology, Finland.
>There's a bug in the Altos Worknet that makes it impossible to change
>a file's access time if the file is on another system (via Worknet).
>To make elm work if you use /usr/mail over Worknet, you need to apply
>the following patch and define WORKNET when compiling leavembox.c.
>
>Note: WORKNET needs to be defined somewhere, the easiest thing is
>to add it manually to src/Makefile. That's how I did it.
>
>*** elm2.2/src/leavembox.cTue Jul 18 20:50:32 1989
>--- elm2.2.altos/src/leavembox.cTue Jul 18 23:36:11 1989
>***************
>*** 557,562 ****
>--- 557,565 ----
> utime_buffer.modtime= buf.st_mtime;
> #endif
>
>+ #ifndef WORKNET
>+ /* Braindamaged WorkNet from Altos doesn't know how to change
>+ a file's access time if it is on another system */
> #ifdef BSD
> if (utime(cur_folder, utime_buffer) != 0) {
> #else
>***************
>*** 569,574 ****
>--- 572,578 ----
> error2("Error %s trying to change file %s access time.",
> error_name(errno), cur_folder);
> }
>+ #endif /* WORKNET */
>
>
> mailfile_size = bytes(cur_folder);
>
>
>Jyrki Kuoppala Helsinki University of Technology, Finland.
>Internet : [email protected] [128.214.3.119]
>BITNET : [email protected] Gravity is a myth, the Earth sucks!
Syd Weinstein
Elm Coordinator
[email protected]
(dsinc!elm)
December 7, 2017
Add comments