Author: mladen.turk(a)jboss.com
Date: 2008-03-28 04:06:48 -0400 (Fri, 28 Mar 2008)
New Revision: 1475
Added:
trunk/build/install/nawk/nawk.exe
trunk/build/install/nawk/nawk.ico
trunk/build/install/nawk/nawk.rc
trunk/build/install/nawk/proctab.c
Removed:
trunk/build/install/nawk/awk.exe
Modified:
trunk/build/install/nawk/makefile.vc
Log:
Use nawk for awk name
Deleted: trunk/build/install/nawk/awk.exe
===================================================================
(Binary files differ)
Modified: trunk/build/install/nawk/makefile.vc
===================================================================
--- trunk/build/install/nawk/makefile.vc 2008-03-27 11:37:57 UTC (rev 1474)
+++ trunk/build/install/nawk/makefile.vc 2008-03-28 08:06:48 UTC (rev 1475)
@@ -23,11 +23,12 @@
NMAKE_WINVER = 0x0500
CC = cl -c
+RC = rc
CFLAGS = -nologo -DWIN32 -D_WIN32 -D_WINDOWS -W3 -D_X86_=1 -O2 -Ob2 -Oy- -Zi -DNDEBUG
CFLAGS = $(CFLAGS) -D_MT -MD -D_WIN32_WINNT=$(NMAKE_WINVER) -DWINVER=$(NMAKE_WINVER)
LINK = link
-LFLAGS = /nologo /INCREMENTAL:NO /DEBUG /OPT:REF /SUBSYSTEM:CONSOLE /MACHINE:I386
+LFLAGS = /nologo /INCREMENTAL:NO /DEBUG /OPT:REF /SUBSYSTEM:CONSOLE /MACHINE:X86
LIBS = kernel32.lib advapi32.lib ole32.lib shell32.lib rpcrt4.lib
YACC = bison -y
@@ -40,8 +41,8 @@
tran.obj \
lib.obj \
run.obj \
- lex.obj \
- missing95.obj
+ missing95.obj \
+ lex.obj
SOURCE = awk.h \
ytab.c \
@@ -56,23 +57,16 @@
lib.c \
run.c \
tran.c \
- proctab.c \
- missing95.c
+ missing95.obj \
+ proctab.c
-LISTING = awk.h \
- proto.h \
- awkgram.y \
- lex.c \
- b.c \
- main.c \
- maketab.c \
- parse.c \
- lib.c \
- run.c \
- tran.c
+nawk.exe: nawk.res ytab.obj $(OFILES)
+ $(LINK) $(LFLAGS) /out:nawk.exe nawk.res ytab.obj $(OFILES) $(LIBS)
+ IF EXIST nawk.exe.manifest \
+ mt -nologo -manifest nawk.exe.manifest -outputresource:nawk.exe;1
-awk.exe: ytab.obj $(OFILES)
- $(LINK) $(LFLAGS) -out:awk.exe ytab.obj $(OFILES) $(LIBS)
+nawk.res: nawk.rc
+ $(RC) /l 0x409 /d "NDEBUG" /fo nawk.res nawk.rc
$(OFILES): awk.h proto.h
Added: trunk/build/install/nawk/nawk.exe
===================================================================
(Binary files differ)
Property changes on: trunk/build/install/nawk/nawk.exe
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added: trunk/build/install/nawk/nawk.ico
===================================================================
(Binary files differ)
Property changes on: trunk/build/install/nawk/nawk.ico
___________________________________________________________________
Name: svn:mime-type
+ image/x-icon
Added: trunk/build/install/nawk/nawk.rc
===================================================================
--- trunk/build/install/nawk/nawk.rc (rev 0)
+++ trunk/build/install/nawk/nawk.rc 2008-03-28 08:06:48 UTC (rev 1475)
@@ -0,0 +1,118 @@
+/*
+ * NAWK - Port of One True Awk
+ *
+ * Copyright(c) 2007 Red Hat Middleware, LLC,
+ * and individual contributors as indicated by the @authors tag.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library in the file COPYING.LIB;
+ * if not, write to the Free Software Foundation, Inc.,
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+ *
+ * @author Mladen Turk
+ */
+#include <windows.h>
+
+#define STR_COPYRIGHT "Copyright � 2008 Lucent Technologies."
+#define STR_LICENSE "Permission to use, copy, modify, and distribute "
\
+ "this software and its documentation for any " \
+ "purpose and without fee is hereby granted, " \
+ "provided that the above copyright notice appear "
\
+ "in all copies and that both that the copyright "
\
+ "notice and this permission notice and warranty "
\
+ "disclaimer appear in supporting documentation, "
\
+ "and that the name Lucent Technologies or any of "
\
+ "its entities not be used in advertising or " \
+ "publicity pertaining to distribution of the " \
+ "software without specific, written prior " \
+ "permission.\n\n" \
+ "LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO "
\
+ "THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES "
\
+ "OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
" \
+ "LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY "
\
+ "SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
" \
+ "DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, "
\
+ "DATA OR PROFITS, WHETHER IN AN ACTION OF " \
+ "CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, "
\
+ "ARISING OUT OF OR IN CONNECTION WITH THE USE OR "
\
+ "PERFORMANCE OF THIS SOFTWARE."
+
+#define STR_COMPANY "Red Hat�, Inc."
+#define STR_TRADEMARK "� Red Hat Inc."
+#define STR_PRODUCT "Nawk: pattern scanning and text processing
language"
+#define STR_VERISON "2008.03.23.0"
+#define CSV_VERISON 2008,3,23,0
+
+#define PRIVATE_BUILD 0
+#define PRERELEASE_BUILD 0
+
+#if PRIVATE_BUILD
+#define STR_PRIVATE "Initial Prerelease"
+#define STR_SPECIAL "Basic functionality"
+#define STD_FILEFLAGS VS_FF_PRIVATEBUILD | VS_FF_SPECIALBUILD
+#else
+#define STD_FILEFLAGS 0x0L
+#endif
+
+#if RERELEASE_BUILD
+#define PSTD_FILEFLAGS STD_FILEFLAGS | VS_FF_PRERELEASE
+#else
+#define PSTD_FILEFLAGS STD_FILEFLAGS
+#endif
+
+#ifdef _DEBUG
+#define APP_FILEFLAGS STD_FILEFLAGS | VS_FF_DEBUG
+#else
+#define APP_FILEFLAGS STD_FILEFLAGS
+#endif
+
+
+IDI_MAINICON ICON "nawk.ico"
+
+LANGUAGE 0x9,0x1
+ 1 VERSIONINFO
+ FILEVERSION CSV_VERISON
+ PRODUCTVERSION CSV_VERISON
+ FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
+ FILEFLAGS APP_FILEFLAGS
+ FILEOS VOS_NT
+ FILETYPE VFT_APP
+ FILESUBTYPE 0x0L
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040904b0"
+ BEGIN
+ VALUE "Comments", STR_PRODUCT "\0"
+ VALUE "CompanyName", STR_COMPANY "\0"
+ VALUE "FileDescription", STR_PRODUCT "\0"
+ VALUE "FileVersion", STR_VERISON "\0"
+ VALUE "InternalName", "nawk"
+ VALUE "LegalCopyright", STR_COPYRIGHT "\0"
+ VALUE "LegalTrademarks", STR_TRADEMARK "\0"
+ VALUE "OriginalFilename", "nawk.exe"
+ VALUE "ProductName", STR_PRODUCT "\0"
+ VALUE "ProductVersion", STR_VERISON "\0"
+#if PRIVATE_BUILD
+ VALUE "PrivateBuild", STR_PRIVATE "\0"
+ VALUE "SpecialBuild", STR_SPECIAL "\0"
+#endif
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x409, 1200
+ END
+END
Added: trunk/build/install/nawk/proctab.c
===================================================================
--- trunk/build/install/nawk/proctab.c (rev 0)
+++ trunk/build/install/nawk/proctab.c 2008-03-28 08:06:48 UTC (rev 1475)
@@ -0,0 +1,207 @@
+#include <stdio.h>
+#include "awk.h"
+#include "awkgram.h"
+
+static const char * const printname[93] = {
+ "FIRSTTOKEN", /* 257 */
+ "PROGRAM", /* 258 */
+ "PASTAT", /* 259 */
+ "PASTAT2", /* 260 */
+ "XBEGIN", /* 261 */
+ "XEND", /* 262 */
+ "NL", /* 263 */
+ "ARRAY", /* 264 */
+ "MATCH", /* 265 */
+ "NOTMATCH", /* 266 */
+ "MATCHOP", /* 267 */
+ "FINAL", /* 268 */
+ "DOT", /* 269 */
+ "ALL", /* 270 */
+ "CCL", /* 271 */
+ "NCCL", /* 272 */
+ "CHAR", /* 273 */
+ "OR", /* 274 */
+ "STAR", /* 275 */
+ "QUEST", /* 276 */
+ "PLUS", /* 277 */
+ "AND", /* 278 */
+ "BOR", /* 279 */
+ "APPEND", /* 280 */
+ "EQ", /* 281 */
+ "GE", /* 282 */
+ "GT", /* 283 */
+ "LE", /* 284 */
+ "LT", /* 285 */
+ "NE", /* 286 */
+ "IN", /* 287 */
+ "ARG", /* 288 */
+ "BLTIN", /* 289 */
+ "BREAK", /* 290 */
+ "CLOSE", /* 291 */
+ "CONTINUE", /* 292 */
+ "DELETE", /* 293 */
+ "DO", /* 294 */
+ "EXIT", /* 295 */
+ "FOR", /* 296 */
+ "FUNC", /* 297 */
+ "SUB", /* 298 */
+ "GSUB", /* 299 */
+ "IF", /* 300 */
+ "INDEX", /* 301 */
+ "LSUBSTR", /* 302 */
+ "MATCHFCN", /* 303 */
+ "NEXT", /* 304 */
+ "NEXTFILE", /* 305 */
+ "ADD", /* 306 */
+ "MINUS", /* 307 */
+ "MULT", /* 308 */
+ "DIVIDE", /* 309 */
+ "MOD", /* 310 */
+ "ASSIGN", /* 311 */
+ "ASGNOP", /* 312 */
+ "ADDEQ", /* 313 */
+ "SUBEQ", /* 314 */
+ "MULTEQ", /* 315 */
+ "DIVEQ", /* 316 */
+ "MODEQ", /* 317 */
+ "POWEQ", /* 318 */
+ "PRINT", /* 319 */
+ "PRINTF", /* 320 */
+ "SPRINTF", /* 321 */
+ "ELSE", /* 322 */
+ "INTEST", /* 323 */
+ "CONDEXPR", /* 324 */
+ "POSTINCR", /* 325 */
+ "PREINCR", /* 326 */
+ "POSTDECR", /* 327 */
+ "PREDECR", /* 328 */
+ "VAR", /* 329 */
+ "IVAR", /* 330 */
+ "VARNF", /* 331 */
+ "CALL", /* 332 */
+ "NUMBER", /* 333 */
+ "STRING", /* 334 */
+ "REGEXPR", /* 335 */
+ "GETLINE", /* 336 */
+ "GENSUB", /* 337 */
+ "RETURN", /* 338 */
+ "SPLIT", /* 339 */
+ "SUBSTR", /* 340 */
+ "WHILE", /* 341 */
+ "CAT", /* 342 */
+ "NOT", /* 343 */
+ "UMINUS", /* 344 */
+ "POWER", /* 345 */
+ "DECR", /* 346 */
+ "INCR", /* 347 */
+ "INDIRECT", /* 348 */
+ "LASTTOKEN", /* 349 */
+};
+
+
+Cell *(*proctab[93])(Node **, int) = {
+ nullproc, /* FIRSTTOKEN */
+ program, /* PROGRAM */
+ pastat, /* PASTAT */
+ dopa2, /* PASTAT2 */
+ nullproc, /* XBEGIN */
+ nullproc, /* XEND */
+ nullproc, /* NL */
+ array, /* ARRAY */
+ matchop, /* MATCH */
+ matchop, /* NOTMATCH */
+ nullproc, /* MATCHOP */
+ nullproc, /* FINAL */
+ nullproc, /* DOT */
+ nullproc, /* ALL */
+ nullproc, /* CCL */
+ nullproc, /* NCCL */
+ nullproc, /* CHAR */
+ nullproc, /* OR */
+ nullproc, /* STAR */
+ nullproc, /* QUEST */
+ nullproc, /* PLUS */
+ boolop, /* AND */
+ boolop, /* BOR */
+ nullproc, /* APPEND */
+ relop, /* EQ */
+ relop, /* GE */
+ relop, /* GT */
+ relop, /* LE */
+ relop, /* LT */
+ relop, /* NE */
+ instat, /* IN */
+ arg, /* ARG */
+ bltin, /* BLTIN */
+ jump, /* BREAK */
+ closefile, /* CLOSE */
+ jump, /* CONTINUE */
+ awkdelete, /* DELETE */
+ dostat, /* DO */
+ jump, /* EXIT */
+ forstat, /* FOR */
+ nullproc, /* FUNC */
+ sub, /* SUB */
+ gsub, /* GSUB */
+ ifstat, /* IF */
+ sindex, /* INDEX */
+ nullproc, /* LSUBSTR */
+ matchop, /* MATCHFCN */
+ jump, /* NEXT */
+ jump, /* NEXTFILE */
+ arith, /* ADD */
+ arith, /* MINUS */
+ arith, /* MULT */
+ arith, /* DIVIDE */
+ arith, /* MOD */
+ assign, /* ASSIGN */
+ nullproc, /* ASGNOP */
+ assign, /* ADDEQ */
+ assign, /* SUBEQ */
+ assign, /* MULTEQ */
+ assign, /* DIVEQ */
+ assign, /* MODEQ */
+ assign, /* POWEQ */
+ printstat, /* PRINT */
+ awkprintf, /* PRINTF */
+ awksprintf, /* SPRINTF */
+ nullproc, /* ELSE */
+ intest, /* INTEST */
+ condexpr, /* CONDEXPR */
+ incrdecr, /* POSTINCR */
+ incrdecr, /* PREINCR */
+ incrdecr, /* POSTDECR */
+ incrdecr, /* PREDECR */
+ nullproc, /* VAR */
+ nullproc, /* IVAR */
+ getnf, /* VARNF */
+ call, /* CALL */
+ nullproc, /* NUMBER */
+ nullproc, /* STRING */
+ nullproc, /* REGEXPR */
+ getline, /* GETLINE */
+ gensub, /* GENSUB */
+ jump, /* RETURN */
+ split, /* SPLIT */
+ substr, /* SUBSTR */
+ whilestat, /* WHILE */
+ cat, /* CAT */
+ boolop, /* NOT */
+ arith, /* UMINUS */
+ arith, /* POWER */
+ nullproc, /* DECR */
+ nullproc, /* INCR */
+ indirect, /* INDIRECT */
+ nullproc, /* LASTTOKEN */
+};
+
+const char *tokname(int n)
+{
+ static char buf[100];
+
+ if (n < FIRSTTOKEN || n > LASTTOKEN) {
+ sprintf(buf, "token %d", n);
+ return buf;
+ }
+ return printname[n-FIRSTTOKEN];
+}
Property changes on: trunk/build/install/nawk/proctab.c
___________________________________________________________________
Name: svn:eol-style
+ native