[114] in SIPB_Linux_Development
Re: linux vtwm.gamma
daemon@ATHENA.MIT.EDU (John T Kohl)
Thu Aug 19 09:57:53 1993
Date: Thu, 19 Aug 1993 09:55:31 -0400
From: John T Kohl <jtkohl@zk3.dec.com>
To: Derek Atkins <warlord@athena.mit.edu>
Cc: linux-dev@athena.mit.edu
In-Reply-To: Derek Atkins's message of Fri, 06 Aug 93 00:06:10 EDT,
<9308060406.AA11155@deathtongue.MIT.EDU>
Sorry for the long delay re: vtwm for linux. In the sources I have
kicking around here, the changes for flex support are as attached. They
may not support some of the weird stuff like putting vtwm tokens into
resources or envariables, sorry. but it's a start:
diffs & whole file attached:
#!/bin/sh
# This is a shell archive (shar 3.32)
# made 08/19/1993 13:52 UTC by jtkohl@shadow.zk3.dec.com
# Source directory /tmp
#
# existing files WILL be overwritten
#
# This shar contains:
# length mode name
# ------ ---------- ------------------------------------------
# 721 -rw-r--r-- flex-diff
# 3947 -r--r--r-- lex.l
#
if touch 2>&1 | fgrep 'amc' > /dev/null
then TOUCH=touch
else TOUCH=true
fi
# ============= flex-diff ==============
echo "x - extracting flex-diff (Text)"
sed 's/^X//' << 'SHAR_EOF' > flex-diff &&
X*** 1.2 1991/02/09 03:38:02
X--- lex.l 1992/02/17 21:17:12
X***************
X*** 42,47 ****
X--- 42,53 ----
X extern char *ProgramName;
X
X extern int ParseError;
X+ #ifdef FLEX_SCANNER
X+ #undef YY_INPUT
X+ #define YY_INPUT(buf, result, max_size) \
X+ { int c = (*twmInputFunc)();\
X+ result = c ? (buf[0] = c, 1) : YY_NULL;}
X+ #endif
X
X %}
X
X***************
X*** 88,95 ****
X--- 94,106 ----
X ParseError = 1;
X }
X %%
X+ #ifndef yywrap
X yywrap() { return(1);}
X+ #endif
X
X+ #ifdef FLEX_SCANNER
X+ int yylineno;
X+ #else
X #undef unput
X #undef input
X #undef output
X***************
X*** 98,100 ****
X--- 109,112 ----
X #define input() (*twmInputFunc)()
X #define output(c) TwmOutput(c)
X #define feof() (1)
X+ #endif
SHAR_EOF
$TOUCH -am 0819095293 flex-diff &&
chmod 0644 flex-diff ||
echo "restore of flex-diff failed"
set `wc -c flex-diff`;Wc_c=$1
if test "$Wc_c" != "721"; then
echo original size 721, current size $Wc_c
fi
# ============= lex.l ==============
echo "x - extracting lex.l (Text)"
sed 's/^X//' << 'SHAR_EOF' > lex.l &&
X%{
X/*****************************************************************************/
X/** Copyright 1988 by Evans & Sutherland Computer Corporation, **/
X/** Salt Lake City, Utah **/
X/** Portions Copyright 1989 by the Massachusetts Institute of Technology **/
X/** Cambridge, Massachusetts **/
X/** **/
X/** All Rights Reserved **/
X/** **/
X/** Permission to use, copy, modify, and distribute this software and **/
X/** its documentation for any purpose and without fee is hereby **/
X/** granted, provided that the above copyright notice appear in all **/
X/** copies and that both that copyright notice and this permis- **/
X/** sion notice appear in supporting documentation, and that the **/
X/** names of Evans & Sutherland and M.I.T. not be used in advertising **/
X/** in publicity pertaining to distribution of the software without **/
X/** specific, written prior permission. **/
X/** **/
X/** EVANS & SUTHERLAND AND M.I.T. DISCLAIM ALL WARRANTIES WITH REGARD **/
X/** TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANT- **/
X/** ABILITY AND FITNESS, IN NO EVENT SHALL EVANS & SUTHERLAND OR **/
X/** M.I.T. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAM- **/
X/** AGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA **/
X/** OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER **/
X/** TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE **/
X/** OR PERFORMANCE OF THIS SOFTWARE. **/
X/*****************************************************************************/
X
X/***********************************************************************
X *
X * $XConsortium: lex.l,v 1.62 89/12/10 17:46:33 jim Exp $
X *
X * .twmrc lex file
X *
X * 12-Nov-87 Thomas E. LaStrange File created
X *
X ***********************************************************************/
X
X/* #include <stdio.h> */ /* lex already includes stdio.h */
X#include "gram.h"
X#include "parse.h"
Xextern char *ProgramName;
X
Xextern int ParseError;
X#ifdef FLEX_SCANNER
X#undef YY_INPUT
X#define YY_INPUT(buf, result, max_size) \
X{ int c = (*twmInputFunc)();\
X result = c ? (buf[0] = c, 1) : YY_NULL;}
X#endif
X
X%}
X
Xstring \"([^"]|\\.)*\"
Xnumber [0-9]+
X%%
X"{" { return (LB); }
X"}" { return (RB); }
X"(" { return (LP); }
X")" { return (RP); }
X"=" { return (EQUALS); }
X":" { return (COLON); }
X"+" { return PLUS; }
X"-" { return MINUS; }
X"|" { return OR; }
X
X[a-zA-Z\.]+ { int token = parse_keyword (yytext,
X &yylval.num);
X if (token == ERRORTOKEN) {
X twmrc_error_prefix();
X fprintf (stderr,
X "ignoring unknown keyword: %s\n",
X yytext);
X ParseError = 1;
X } else
X return token;
X }
X
X"!" { yylval.num = F_EXEC; return FSKEYWORD; }
X"^" { yylval.num = F_CUT; return FSKEYWORD; }
X
X{string} { yylval.ptr = (char *)yytext; return STRING; }
X{number} { (void)sscanf(yytext, "%d", &yylval.num);
X return (NUMBER);
X }
X\#[^\n]*\n {;}
X[\n\t ] {;}
X\\\n {;}
X. {
X twmrc_error_prefix();
X fprintf (stderr,
X "ignoring character \"%s\"\n",
X yytext);
X ParseError = 1;
X }
X%%
X#ifndef yywrap
Xyywrap() { return(1);}
X#endif
X
X#ifdef FLEX_SCANNER
Xint yylineno;
X#else
X#undef unput
X#undef input
X#undef output
X#undef feof
X#define unput(c) twmUnput(c)
X#define input() (*twmInputFunc)()
X#define output(c) TwmOutput(c)
X#define feof() (1)
X#endif
SHAR_EOF
$TOUCH -am 0819095293 lex.l &&
chmod 0444 lex.l ||
echo "restore of lex.l failed"
set `wc -c lex.l`;Wc_c=$1
if test "$Wc_c" != "3947"; then
echo original size 3947, current size $Wc_c
fi
exit 0