Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!mnetor!seismo!rutgers!sri-spam!ames!ucla-cs!sdcrdcf!faigin
From: faigin@sdcrdcf.UUCP (Daniel P Faigin)
Newsgroups: comp.sources.wanted
Subject: Re: Dvorak keyboard translator wanted
Message-ID: <3540@sdcrdcf.UUCP>
Date: Mon, 15-Dec-86 11:47:28 EST
Article-I.D.: sdcrdcf.3540
Posted: Mon Dec 15 11:47:28 1986
Date-Received: Tue, 16-Dec-86 22:48:15 EST
References: <329@stl.stc.co.uk> <1006@theory.cs.cmu.edu>
Reply-To: faigin@sdcrdcf.UUCP (Daniel P Faigin)
Organization: System Development Corporation R&D, Santa Monica
Lines: 106
Keywords: Dvorak

In article <1006@theory.cs.cmu.edu> tsf@theory.cs.cmu.edu (Timothy Freeman) writes:
>Does anyone out there have a filter for some flavor of Unix which
>makes a QWERTY keyboard behave like a DVORAK keyboard?

Well, the following does what you want. It may be a bit hard to
read -- it was the grand prize winner in last year's obfusticated
C contest. Note that it is self documenting. I should also add
that I am posting this for its author, Larry Wall, who isn't here
this week. 

[P.S.] To those asking about warp, it will probably be released
sometime in January.

--- cut here ---
#define _c(C)_ (C)&('|'+3):c_()(C)>>('\n'-3) __ /**/
#define C char*
#define keyboard ",,B3-u;.(&*5., /(b*(1\036!a%\031m,,,,,\r\n"
#define main(o,oo)oo(o){
#define _ ;case
C
#define c_(cc)c cc=
#define C_(sand)_O(sand)witch
o=keyboard;
#define __ ;break;
C
ccc(
cc)
C
cc;
{
C
cccc=
cc;int
#ifndef lint
#define keyboard "dijs QH.soav Vdtnsaoh DmfpaksoQz;kkt oa, -dijs"
#endif
c;
main(;c_(=(*cc);*cc++)c,for);
#define _O(s)s
main(0xb+(c>>5),C_(s))
_'\v'
:__ _'\f':
main(c,C_(s));
_c(8098)_c(6055)_c(14779)_c(10682)
#define O_(O)_O(O)stem(ccc(
_c(15276)_c(11196)_c(15150)
#define _C ;return
_c(11070)_c(15663)_c(11583)
}
__
default
:c_(+)o[c&__LINE__-007];
main(c_(-)'-'-1,C_(s))_
0214
:_
0216
:c_(+)025 _
0207
:c_(-)4 _
0233
:c_(+)' '-1;
}}c_(&)'z'+5;
}_C cccc;
}main(,cc)
C
#define O write(1,
c="O";
O_(sy) keyboard));
main(;;,for);
read(0,
c,1);*
c_(&)'~'+1
;O ccc(
c),
'\0');
main(*c,
C_(s));_
4
:O_(sy)";kkt -oa, dijszdijs QQ"))_C
_
13
:O o+' ',
3
)
#undef main
__ _ 127:O"\b \b",3)__
default
:O
c,1)
__}}}main(){
cc();
}
--- end cut here ---

Daniel Faigin (Larry's Officemate)
-- 
UUCP: {akgua allegra ihnp4 hplabs sdcsvax trwrb cbosgd}!sdcrdcf!faigin  
ARPA: sdcrdcf!faigin@UCLA-LOCUS.ARPA --or-- sdcrdcf!faigin@LOCUS.UCLA.EDU
              o
W (Daniel): UNISYS (Defense Systems - System Developement Group)*
            2525 Colorado MD 91-01; Santa Monica CA 90406; (213) 820-4111 x6393
W (Karen) : Amex Systems Incorporated (An Allied Bendix Aerospace Company)
            107 West Carob Street; Compton CA 90220; (213) 604-4500 x4838
H: 8333 Columbus Avenue #17; Sepulveda CA 91343

[*: Formerly, System Development Corporation]