diff -cr gawk-3.0.2/array.c new/array.c
*** gawk-3.0.2/array.c	Sun Oct 20 16:27:14 1996
--- new/array.c	Tue Dec 31 16:22:36 1996
***************
*** 236,244 ****
  		symbol = stack_ptr[symbol->param_cnt];
  	if ((symbol->flags & SCALAR) != 0)
  		fatal("attempt to use scalar as array");
! 	if (symbol->var_array == NULL)
! 		return 0;
  	subs = concat_exp(subs);	/* concat_exp returns a string node */
  	hash1 = hash(subs->stptr, subs->stlen, (unsigned long) symbol->array_size);
  	ret = (assoc_find(symbol, subs, hash1) != NULL);
  	free_temp(subs);
--- 236,249 ----
  		symbol = stack_ptr[symbol->param_cnt];
  	if ((symbol->flags & SCALAR) != 0)
  		fatal("attempt to use scalar as array");
! 	/*
! 	 * evaluate subscript first, it could have side effects
! 	 */
  	subs = concat_exp(subs);	/* concat_exp returns a string node */
+ 	if (symbol->var_array == NULL) {
+ 		free_temp(subs);
+ 		return 0;
+ 	}
  	hash1 = hash(subs->stptr, subs->stlen, (unsigned long) symbol->array_size);
  	ret = (assoc_find(symbol, subs, hash1) != NULL);
  	free_temp(subs);
diff -cr gawk-3.0.2/pc/Makefile new/pc/Makefile
*** gawk-3.0.2/pc/Makefile	Sat Dec  7 10:31:10 1996
--- new/pc/Makefile	Thu Jan  2 20:20:53 1997
***************
*** 1,10 ****
! # Makefile for gawk (GNU awk)                                   7 Oct 1996
  #
! # - for GNU C (djgpp)         [executable for DOS (32-bit)]
! # - for GNU C (emx)           [executable for OS/2 2.x or DOS (32-bit)]
! # - for Microsoft C 7         [ececutable for DOS (16-bit)]
! # - for Microsoft C 6.00A     [executable for OS/2 or DOS (16-bit)]
! # - for Microsoft C 5.1       [executable for OS/2 or DOS (16-bit)]
  
  # Tested with GNU make and dmake-3.8 under OS/2 and DOS, and ndmake
  # under DOS.  Compiling with dmake under DOS may require the DOS-only 
--- 1,9 ----
! # Makefile for gawk (GNU awk)                                   2 Jan 1997
  #
! # - for GNU C (djgpp)         [32bit executable for DOS]
! # - for GNU C (emx)           [32bit executable for OS/2 or DOS or NT]
! # - for Microsoft C 7         [16bit ececutable for DOS]
! # - for Microsoft C 6.00A     [16bit executable for OS/2 or DOS]
  
  # Tested with GNU make and dmake-3.8 under OS/2 and DOS, and ndmake
  # under DOS.  Compiling with dmake under DOS may require the DOS-only 
***************
*** 13,20 ****
  default:
  	@echo "Enter $(MAK) target "
  	@echo " where 'target' is chosen from                          " 
! 	@echo "  djgpp ... DOS 32-bit exe [GNU C, Delorie, v1 or v2]   "
  	@echo "  emx ..... OS/2 32-bit exe [emx/gcc; uses emxlibc.dll] "
  	@echo "  emxbnd .. OS/2 and DOS 32-bit exe [emx/gcc]           "
  	@echo "  msc ..... DOS exe [Microsoft C 7 & 8 (AKA 1.52)]      "
  	@echo "  msc6 .... DOS exe [Microsoft C 6.00a]                 "
--- 12,21 ----
  default:
  	@echo "Enter $(MAK) target "
  	@echo " where 'target' is chosen from                          " 
! 	@echo "  djgpp ... DOS 32-bit exe [GNU C, Delorie, v2]         "
! 	@echo "  djgppv1 . DOS 32-bit exe [GNU C, Delorie, v1]         "
  	@echo "  emx ..... OS/2 32-bit exe [emx/gcc; uses emxlibc.dll] "
+ 	@echo "  emxnt ... NT exe [emx/gcc with RSXNT]                 "
  	@echo "  emxbnd .. OS/2 and DOS 32-bit exe [emx/gcc]           "
  	@echo "  msc ..... DOS exe [Microsoft C 7 & 8 (AKA 1.52)]      "
  	@echo "  msc6 .... DOS exe [Microsoft C 6.00a]                 "
***************
*** 26,31 ****
--- 27,33 ----
  	@echo "  install . Install gawk under $(prefix)/               "
  
  # Support dropped in 3.0
+ # - for Microsoft C 5.1       [16bit executable for OS/2 or DOS]
  #	@echo "  msc51     DOS exe [Microsoft C 5.1]                   "
  #	@echo "  msc51bnd  OS/2 and DOS exe [Microsoft C 5.1]          "
  
***************
*** 77,85 ****
  #========================== DJGPP =======================================
  #========================================================================
  
! LDJG = $(CC) $(LF) -o gawk $(LDRSP) $(LF2)
! #BDJG = coff2exe -s /djgpp/bin/go32.exe gawk
! BDJG = coff2exe gawk
  
  djgpp:
  	$(MAK) all \
--- 79,86 ----
  #========================== DJGPP =======================================
  #========================================================================
  
! LDJG = $(CC) $(LF) -o gawk.exe $(LDRSP) $(LF2)
! BDJG = stubify -g awk.exe | stubedit awk.exe runfile=gawk
  
  djgpp:
  	$(MAK) all \
***************
*** 93,98 ****
--- 94,109 ----
  	LNK=LDJG LF2=-lm \
  	BIND=BDJG
  
+ LDJGv1 = $(CC) $(LF) -o gawk $(LDRSP) $(LF2)
+ #BDJGv1 = coff2exe -s /djgpp/bin/go32.exe gawk
+ BDJGv1 = coff2exe gawk
+ 
+ djgppv1:
+ 	$(MAK) all \
+ 	CC=gcc O=.o CF=-O \
+ 	LNK=LDJGv1 LF=-s LF2=-lm \
+ 	BIND=BDJGv1
+ 
  #========================================================================
  #========================== EMX =========================================
  #========================================================================
***************
*** 112,117 ****
--- 123,133 ----
  	"CC=gcc -Zomf" O=.obj "CF=-O -DOS2" \
  	LNK=LEMX "LF=-s -Zcrtdll -Zstack 512" RSP=
  
+ emxnt:
+ 	$(MAK) all \
+ 	"CC=gcc -Zwin32 -Zcrtdll=rsxntcs" O=.o "CF=-O -DOS2" \
+ 	LNK=LEMX "LF=-s -Zstack 512" RSP=
+ 
  emxbnd:
  	$(MAK) all \
  	CC=gcc O=.o "CF=-O -DOS2 -DMSDOS" OBJ=popen.o \
***************
*** 293,299 ****
  	sed "s;igawk;$(prefix)/bin/igawk;" pc/awklib/igawk.bat > igawk.bat
  	sh mkinstal.sh $(prefix)/bin
  	sh mkinstal.sh $(prefix)/lib/awk $(prefix)/man/man1 $(prefix)/info
! 	cp gawk.exe igawk.bat igawk.cmd pc/awklib/igawk $(prefix)/bin
  	cp awklib/eg/lib/* pc/awklib/igawk.awk $(prefix)/lib/awk
  	cp doc/*.1 $(prefix)/man/man1
  	cp doc/gawk.info $(prefix)/info
--- 309,315 ----
  	sed "s;igawk;$(prefix)/bin/igawk;" pc/awklib/igawk.bat > igawk.bat
  	sh mkinstal.sh $(prefix)/bin
  	sh mkinstal.sh $(prefix)/lib/awk $(prefix)/man/man1 $(prefix)/info
! 	cp *awk.exe igawk.bat igawk.cmd pc/awklib/igawk $(prefix)/bin
  	cp awklib/eg/lib/* pc/awklib/igawk.awk $(prefix)/lib/awk
  	cp doc/*.1 $(prefix)/man/man1
  	cp doc/gawk.info $(prefix)/info
diff -cr gawk-3.0.2/pc/config.h new/pc/config.h
*** gawk-3.0.2/pc/config.h	Mon Oct  7 18:36:28 1996
--- new/pc/config.h	Mon Dec 30 20:23:06 1996
***************
*** 211,213 ****
--- 211,217 ----
  #if defined(DJGPP)
  # define HAVE_LIMITS_H
  #endif
+ 
+ #if defined(__WIN32__) && defined(__CRTRSXNT__)
+ #include <crtrsxnt.h>
+ #endif
diff -cr gawk-3.0.2/pc/install.awk new/pc/install.awk
*** gawk-3.0.2/pc/install.awk	Tue Jan  9 20:10:11 1996
--- new/pc/install.awk	Tue Dec 31 16:36:14 1996
***************
*** 53,59 ****
  printf("@sh %s/bin/igawk %%1 %%2 %%3 %%4 %%5 %%6 %%7 %%8 %%9", prefix) > igawk_bat
  
  # Do common
! cp(igawk " gawk.exe " prefix "/bin")
  mkinstalldirs(prefix "/lib/awk " prefix "/man/man1 " prefix "/info")
  cp("awklib/eg/lib/* pc/awklib/igawk.awk " prefix "/lib/awk");
  cp("doc/*.1 " prefix "/man/man1");
--- 53,59 ----
  printf("@sh %s/bin/igawk %%1 %%2 %%3 %%4 %%5 %%6 %%7 %%8 %%9", prefix) > igawk_bat
  
  # Do common
! cp(igawk " *awk.exe " prefix "/bin")
  mkinstalldirs(prefix "/lib/awk " prefix "/man/man1 " prefix "/info")
  cp("awklib/eg/lib/* pc/awklib/igawk.awk " prefix "/lib/awk");
  cp("doc/*.1 " prefix "/man/man1");
