diff --git a/qse/bld/msdos-watcom/makefile b/qse/bld/msdos-watcom/makefile
index 3e36ac8c..9ebf56cd 100644
--- a/qse/bld/msdos-watcom/makefile
+++ b/qse/bld/msdos-watcom/makefile
@@ -480,26 +480,26 @@ $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-static$(BUILDDIR_TCPV40HDRS)\qsexli.lib : $(
@for %i in ($(LIBQSEXLI_OBJECTS)) do @%append $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-static$(BUILDDIR_TCPV40HDRS)\libqsexli.lbc +%i
wlib -q -p4096 -n -b $^@ @$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-static$(BUILDDIR_TCPV40HDRS)\libqsexli.lbc
-$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-static$(BUILDDIR_TCPV40HDRS)\qseawk.exe : $(EXEQSEAWK_OBJECTS) $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-static$(BUILDDIR_TCPV40HDRS)\qsecmn.lib $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-static$(BUILDDIR_TCPV40HDRS)\qseawk.lib $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-static$(BUILDDIR_TCPV40HDRS)\qsesed.lib
+$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-static$(BUILDDIR_TCPV40HDRS)\qseawk.exe : $(EXEQSEAWK_OBJECTS) $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-static$(BUILDDIR_TCPV40HDRS)\qsecmn.lib $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-static$(BUILDDIR_TCPV40HDRS)\qsesys.lib $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-static$(BUILDDIR_TCPV40HDRS)\qseawk.lib $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-static$(BUILDDIR_TCPV40HDRS)\qsesed.lib
@%create $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-static$(BUILDDIR_TCPV40HDRS)\exeqseawk.lbc
@%append $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-static$(BUILDDIR_TCPV40HDRS)\exeqseawk.lbc option quiet
@%append $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-static$(BUILDDIR_TCPV40HDRS)\exeqseawk.lbc name $^@
@%append $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-static$(BUILDDIR_TCPV40HDRS)\exeqseawk.lbc option caseexact
@%append $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-static$(BUILDDIR_TCPV40HDRS)\exeqseawk.lbc $(__DEBUG_INFO_3) system $(__DOS_LDFLAG) $(LDFLAGS)
@for %i in ($(EXEQSEAWK_OBJECTS)) do @%append $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-static$(BUILDDIR_TCPV40HDRS)\exeqseawk.lbc file %i
- @for %i in ( $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-static$(BUILDDIR_TCPV40HDRS)\qsecmn.lib $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-static$(BUILDDIR_TCPV40HDRS)\qseawk.lib $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-static$(BUILDDIR_TCPV40HDRS)\qsesed.lib wattcpwf.lib ) do @%append $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-static$(BUILDDIR_TCPV40HDRS)\exeqseawk.lbc library %i
+ @for %i in ( $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-static$(BUILDDIR_TCPV40HDRS)\qsecmn.lib $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-static$(BUILDDIR_TCPV40HDRS)\qsesys.lib $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-static$(BUILDDIR_TCPV40HDRS)\qseawk.lib $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-static$(BUILDDIR_TCPV40HDRS)\qsesed.lib wattcpwf.lib ) do @%append $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-static$(BUILDDIR_TCPV40HDRS)\exeqseawk.lbc library %i
@%append $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-static$(BUILDDIR_TCPV40HDRS)\exeqseawk.lbc
@for %i in (256k) do @%append $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-static$(BUILDDIR_TCPV40HDRS)\exeqseawk.lbc option stack=%i
wlink @$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-static$(BUILDDIR_TCPV40HDRS)\exeqseawk.lbc
-$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-static$(BUILDDIR_TCPV40HDRS)\qsesed.exe : $(EXEQSESED_OBJECTS) $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-static$(BUILDDIR_TCPV40HDRS)\qsecmn.lib $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-static$(BUILDDIR_TCPV40HDRS)\qsesed.lib
+$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-static$(BUILDDIR_TCPV40HDRS)\qsesed.exe : $(EXEQSESED_OBJECTS) $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-static$(BUILDDIR_TCPV40HDRS)\qsecmn.lib $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-static$(BUILDDIR_TCPV40HDRS)\qsesys.lib $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-static$(BUILDDIR_TCPV40HDRS)\qsesed.lib
@%create $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-static$(BUILDDIR_TCPV40HDRS)\exeqsesed.lbc
@%append $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-static$(BUILDDIR_TCPV40HDRS)\exeqsesed.lbc option quiet
@%append $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-static$(BUILDDIR_TCPV40HDRS)\exeqsesed.lbc name $^@
@%append $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-static$(BUILDDIR_TCPV40HDRS)\exeqsesed.lbc option caseexact
@%append $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-static$(BUILDDIR_TCPV40HDRS)\exeqsesed.lbc $(__DEBUG_INFO_3) system $(__DOS_LDFLAG) $(LDFLAGS)
@for %i in ($(EXEQSESED_OBJECTS)) do @%append $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-static$(BUILDDIR_TCPV40HDRS)\exeqsesed.lbc file %i
- @for %i in ( $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-static$(BUILDDIR_TCPV40HDRS)\qsecmn.lib $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-static$(BUILDDIR_TCPV40HDRS)\qsesed.lib) do @%append $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-static$(BUILDDIR_TCPV40HDRS)\exeqsesed.lbc library %i
+ @for %i in ( $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-static$(BUILDDIR_TCPV40HDRS)\qsecmn.lib $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-static$(BUILDDIR_TCPV40HDRS)\qsesys.lib $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-static$(BUILDDIR_TCPV40HDRS)\qsesed.lib) do @%append $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-static$(BUILDDIR_TCPV40HDRS)\exeqsesed.lbc library %i
@%append $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-static$(BUILDDIR_TCPV40HDRS)\exeqsesed.lbc
@for %i in (256k) do @%append $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-static$(BUILDDIR_TCPV40HDRS)\exeqsesed.lbc option stack=%i
wlink @$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-static$(BUILDDIR_TCPV40HDRS)\exeqsesed.lbc
diff --git a/qse/bld/os2-watcom/makefile b/qse/bld/os2-watcom/makefile
index bdf090bd..8933b9d9 100644
--- a/qse/bld/os2-watcom/makefile
+++ b/qse/bld/os2-watcom/makefile
@@ -1010,26 +1010,26 @@ $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\qsex
wlib -q -p4096 -n -b $^@ @$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsexli.lbc
!endif
-$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\qseawk.exe : $(EXEQSEAWK_OBJECTS) $(__libqsecmn___depname) $(__libqseawk___depname) $(__EXTLIB_FOR_QSEAWK_DEP)
+$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\qseawk.exe : $(EXEQSEAWK_OBJECTS) $(__libqsecmn___depname) $(__libqsesys___depname) $(__libqseawk___depname) $(__EXTLIB_FOR_QSEAWK_DEP)
@%create $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\exeqseawk.lbc
@%append $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\exeqseawk.lbc option quiet
@%append $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\exeqseawk.lbc name $^@
@%append $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\exeqseawk.lbc option caseexact
@%append $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\exeqseawk.lbc $(__DEBUG_INFO_1_7) system os2v2 $(LDFLAGS)
@for %i in ($(EXEQSEAWK_OBJECTS)) do @%append $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\exeqseawk.lbc file %i
- @for %i in ( $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\qsecmn.lib $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\qseawk.lib $(VAR) $(__SYSLIB_SOCKET_p) $(__SYSLIB_SOCKET2_p)) do @%append $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\exeqseawk.lbc library %i
+ @for %i in ( $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\qsecmn.lib $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\qsesys.lib $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\qseawk.lib $(VAR) $(__SYSLIB_SOCKET_p) $(__SYSLIB_SOCKET2_p)) do @%append $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\exeqseawk.lbc library %i
@%append $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\exeqseawk.lbc
@for %i in () do @%append $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\exeqseawk.lbc option stack=%i
wlink @$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\exeqseawk.lbc
-$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\qsesed.exe : $(EXEQSESED_OBJECTS) $(__libqsecmn___depname) $(VAR)
+$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\qsesed.exe : $(EXEQSESED_OBJECTS) $(__libqsecmn___depname) $(__libqsesys___depname) $(VAR)
@%create $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\exeqsesed.lbc
@%append $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\exeqsesed.lbc option quiet
@%append $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\exeqsesed.lbc name $^@
@%append $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\exeqsesed.lbc option caseexact
@%append $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\exeqsesed.lbc $(__DEBUG_INFO_1_7) system os2v2 $(LDFLAGS)
@for %i in ($(EXEQSESED_OBJECTS)) do @%append $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\exeqsesed.lbc file %i
- @for %i in ( $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\qsecmn.lib $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\qsesed.lib) do @%append $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\exeqsesed.lbc library %i
+ @for %i in ( $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\qsecmn.lib $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\qsesys.lib $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\qsesed.lib) do @%append $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\exeqsesed.lbc library %i
@%append $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\exeqsesed.lbc
@for %i in () do @%append $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\exeqsesed.lbc option stack=%i
wlink @$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\exeqsesed.lbc
diff --git a/qse/bld/qse.bkl b/qse/bld/qse.bkl
index 8fa51244..681c602e 100644
--- a/qse/bld/qse.bkl
+++ b/qse/bld/qse.bkl
@@ -562,6 +562,7 @@
../../cmd/awk
awk.c
libqsecmn
+ libqsesys
libqseawk
$(EXTLIB_FOR_QSEAWK)
@@ -577,6 +578,7 @@
../../cmd/sed
sed.c
libqsecmn
+ libqsesys
libqsesed
diff --git a/qse/bld/win32-borland/makefile b/qse/bld/win32-borland/makefile
index e32281ed..77d52eae 100644
--- a/qse/bld/win32-borland/makefile
+++ b/qse/bld/win32-borland/makefile
@@ -1003,14 +1003,14 @@ $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\qsex
|
!endif
-$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\qseawk.exe: $(EXEQSEAWK_OBJECTS) $(__libqsecmn___depname) $(__libqseawk___depname) $(__EXTLIB_FOR_QSEAWK_DEP)
+$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\qseawk.exe: $(EXEQSEAWK_OBJECTS) $(__libqsecmn___depname) $(__libqsesys___depname) $(__libqseawk___depname) $(__EXTLIB_FOR_QSEAWK_DEP)
ilink32 -Tpe -q -L$(BCCDIR)\lib -L$(BCCDIR)\lib\psdk $(__DEBUG_INFO) -ap $(LDFLAGS) @&&|
- c0x32.obj $(EXEQSEAWK_OBJECTS),$@,, $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\qsecmn.lib $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\qseawk.lib $(VAR) kernel32.lib user32.lib ws2_32.lib import32.lib cw32mt.lib,,
+ c0x32.obj $(EXEQSEAWK_OBJECTS),$@,, $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\qsecmn.lib $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\qsesys.lib $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\qseawk.lib $(VAR) kernel32.lib user32.lib ws2_32.lib import32.lib cw32mt.lib,,
|
-$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\qsesed.exe: $(EXEQSESED_OBJECTS) $(__libqsecmn___depname) $(VAR)
+$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\qsesed.exe: $(EXEQSESED_OBJECTS) $(__libqsecmn___depname) $(__libqsesys___depname) $(VAR)
ilink32 -Tpe -q -L$(BCCDIR)\lib -L$(BCCDIR)\lib\psdk $(__DEBUG_INFO) -ap $(LDFLAGS) @&&|
- c0x32.obj $(EXEQSESED_OBJECTS),$@,, $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\qsecmn.lib $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\qsesed.lib import32.lib cw32mt.lib,,
+ c0x32.obj $(EXEQSESED_OBJECTS),$@,, $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\qsecmn.lib $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\qsesys.lib $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\qsesed.lib import32.lib cw32mt.lib,,
|
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\qsehttpd.exe: $(EXEQSEHTTPD_OBJECTS) $(__libqsecmn___depname) $(__libqsehttp___depname) $(__libqsexli___depname)
diff --git a/qse/bld/win32-msvc/makefile b/qse/bld/win32-msvc/makefile
index 8523eafb..bbc5aec0 100644
--- a/qse/bld/win32-msvc/makefile
+++ b/qse/bld/win32-msvc/makefile
@@ -1091,14 +1091,14 @@ $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\qsex
<<
!endif
-$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\qseawk.exe: $(EXEQSEAWK_OBJECTS) $(__libqsecmn___depname) $(__libqseawk___depname) $(__EXTLIB_FOR_QSEAWK_DEP)
+$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\qseawk.exe: $(EXEQSEAWK_OBJECTS) $(__libqsecmn___depname) $(__libqsesys___depname) $(__libqseawk___depname) $(__EXTLIB_FOR_QSEAWK_DEP)
link /NOLOGO /OUT:$@ $(__DEBUG_INFO_28) /pdb:"$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\qseawk.pdb" $(__DEBUG_INFO_240) /SUBSYSTEM:CONSOLE $(LDFLAGS) @<<
- $(EXEQSEAWK_OBJECTS) $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\qsecmn.lib $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\qseawk.lib $(VAR) kernel32.lib user32.lib ws2_32.lib
+ $(EXEQSEAWK_OBJECTS) $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\qsecmn.lib $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\qsesys.lib $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\qseawk.lib $(VAR) kernel32.lib user32.lib ws2_32.lib
<<
-$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\qsesed.exe: $(EXEQSESED_OBJECTS) $(__libqsecmn___depname) $(VAR)
+$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\qsesed.exe: $(EXEQSESED_OBJECTS) $(__libqsecmn___depname) $(__libqsesys___depname) $(VAR)
link /NOLOGO /OUT:$@ $(__DEBUG_INFO_28) /pdb:"$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\qsesed.pdb" $(__DEBUG_INFO_255) /SUBSYSTEM:CONSOLE $(LDFLAGS) @<<
- $(EXEQSESED_OBJECTS) $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\qsecmn.lib $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\qsesed.lib
+ $(EXEQSESED_OBJECTS) $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\qsecmn.lib $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\qsesys.lib $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\qsesed.lib
<<
$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\qsehttpd.exe: $(EXEQSEHTTPD_OBJECTS) $(__libqsecmn___depname) $(__libqsehttp___depname) $(__libqsexli___depname)
diff --git a/qse/bld/win32-watcom/makefile b/qse/bld/win32-watcom/makefile
index 96e6c133..8c4da3ed 100644
--- a/qse/bld/win32-watcom/makefile
+++ b/qse/bld/win32-watcom/makefile
@@ -999,26 +999,26 @@ $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\qsex
wlib -q -p4096 -n -b $^@ @$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\libqsexli.lbc
!endif
-$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\qseawk.exe : $(EXEQSEAWK_OBJECTS) $(__libqsecmn___depname) $(__libqseawk___depname) $(__EXTLIB_FOR_QSEAWK_DEP)
+$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\qseawk.exe : $(EXEQSEAWK_OBJECTS) $(__libqsecmn___depname) $(__libqsesys___depname) $(__libqseawk___depname) $(__EXTLIB_FOR_QSEAWK_DEP)
@%create $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\exeqseawk.lbc
@%append $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\exeqseawk.lbc option quiet
@%append $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\exeqseawk.lbc name $^@
@%append $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\exeqseawk.lbc option caseexact
@%append $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\exeqseawk.lbc $(__DEBUG_INFO_1_7) system nt ref 'main_' $(LDFLAGS)
@for %i in ($(EXEQSEAWK_OBJECTS)) do @%append $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\exeqseawk.lbc file %i
- @for %i in ( $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\qsecmn.lib $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\qseawk.lib $(VAR) kernel32.lib user32.lib ws2_32.lib ) do @%append $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\exeqseawk.lbc library %i
+ @for %i in ( $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\qsecmn.lib $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\qsesys.lib $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\qseawk.lib $(VAR) kernel32.lib user32.lib ws2_32.lib ) do @%append $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\exeqseawk.lbc library %i
@%append $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\exeqseawk.lbc
@for %i in () do @%append $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\exeqseawk.lbc option stack=%i
wlink @$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\exeqseawk.lbc
-$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\qsesed.exe : $(EXEQSESED_OBJECTS) $(__libqsecmn___depname) $(VAR)
+$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\qsesed.exe : $(EXEQSESED_OBJECTS) $(__libqsecmn___depname) $(__libqsesys___depname) $(VAR)
@%create $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\exeqsesed.lbc
@%append $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\exeqsesed.lbc option quiet
@%append $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\exeqsesed.lbc name $^@
@%append $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\exeqsesed.lbc option caseexact
@%append $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\exeqsesed.lbc $(__DEBUG_INFO_1_7) system nt ref 'main_' $(LDFLAGS)
@for %i in ($(EXEQSESED_OBJECTS)) do @%append $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\exeqsesed.lbc file %i
- @for %i in ( $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\qsecmn.lib $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\qsesed.lib) do @%append $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\exeqsesed.lbc library %i
+ @for %i in ( $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\qsecmn.lib $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\qsesys.lib $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\qsesed.lib) do @%append $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\exeqsesed.lbc library %i
@%append $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\exeqsesed.lbc
@for %i in () do @%append $(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\exeqsesed.lbc option stack=%i
wlink @$(BUILDDIR_BUILD)-$(BUILDDIR_CHAR)-$(BUILDDIR_SHARED)$(BUILDDIR_TCPV40HDRS)\exeqsesed.lbc
diff --git a/qse/cmd/awk/Makefile.am b/qse/cmd/awk/Makefile.am
index 370fec36..28625a3d 100644
--- a/qse/cmd/awk/Makefile.am
+++ b/qse/cmd/awk/Makefile.am
@@ -18,8 +18,9 @@ endif
bin_PROGRAMS = qseawk
qseawk_SOURCES = awk.c
-qseawk_LDFLAGS = -L../../lib/awk -L../../lib/cmn
-qseawk_LDADD = -lqseawk -lqsecmn $(LIBM) $(LIBLTDL)
+qseawk_CFLAGS = $(PTHREAD_CFLAGS)
+qseawk_LDFLAGS = -L../../lib/awk -L../../lib/sys -L../../lib/cmn
+qseawk_LDADD = -lqseawk -lqsesys -lqsecmn $(LIBM) $(LIBLTDL) $(PTHREAD_LIBS)
if WIN32
if WCHAR
diff --git a/qse/cmd/awk/Makefile.in b/qse/cmd/awk/Makefile.in
index a90d9c79..f01b1bd4 100644
--- a/qse/cmd/awk/Makefile.in
+++ b/qse/cmd/awk/Makefile.in
@@ -107,18 +107,19 @@ CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
am__installdirs = "$(DESTDIR)$(bindir)"
PROGRAMS = $(bin_PROGRAMS)
-am_qseawk_OBJECTS = awk.$(OBJEXT)
+am_qseawk_OBJECTS = qseawk-awk.$(OBJEXT)
qseawk_OBJECTS = $(am_qseawk_OBJECTS)
am__DEPENDENCIES_1 =
@WCHAR_TRUE@@WIN32_TRUE@am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1)
qseawk_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
- $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1)
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2) \
+ $(am__DEPENDENCIES_1)
AM_V_lt = $(am__v_lt_@AM_V@)
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
am__v_lt_0 = --silent
am__v_lt_1 =
qseawk_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
- $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(qseawk_CFLAGS) $(CFLAGS) \
$(qseawk_LDFLAGS) $(LDFLAGS) -o $@
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
@@ -360,9 +361,11 @@ AUTOMAKE_OPTIONS = nostdinc
AM_CPPFLAGS = -I$(top_builddir)/include -I$(top_srcdir)/include \
$(LTDLINCL) $(am__append_1) $(am__append_2)
qseawk_SOURCES = awk.c
-qseawk_LDFLAGS = -L../../lib/awk -L../../lib/cmn $(am__append_4)
-qseawk_LDADD = -lqseawk -lqsecmn $(LIBM) $(LIBLTDL) $(am__append_3) \
- $(am__append_5)
+qseawk_CFLAGS = $(PTHREAD_CFLAGS)
+qseawk_LDFLAGS = -L../../lib/awk -L../../lib/sys -L../../lib/cmn \
+ $(am__append_4)
+qseawk_LDADD = -lqseawk -lqsesys -lqsecmn $(LIBM) $(LIBLTDL) \
+ $(PTHREAD_LIBS) $(am__append_3) $(am__append_5)
all: all-am
.SUFFIXES:
@@ -457,7 +460,7 @@ mostlyclean-compile:
distclean-compile:
-rm -f *.tab.c
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/awk.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/qseawk-awk.Po@am__quote@
.c.o:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@@ -480,6 +483,20 @@ distclean-compile:
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
+qseawk-awk.o: awk.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(qseawk_CFLAGS) $(CFLAGS) -MT qseawk-awk.o -MD -MP -MF $(DEPDIR)/qseawk-awk.Tpo -c -o qseawk-awk.o `test -f 'awk.c' || echo '$(srcdir)/'`awk.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/qseawk-awk.Tpo $(DEPDIR)/qseawk-awk.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='awk.c' object='qseawk-awk.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(qseawk_CFLAGS) $(CFLAGS) -c -o qseawk-awk.o `test -f 'awk.c' || echo '$(srcdir)/'`awk.c
+
+qseawk-awk.obj: awk.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(qseawk_CFLAGS) $(CFLAGS) -MT qseawk-awk.obj -MD -MP -MF $(DEPDIR)/qseawk-awk.Tpo -c -o qseawk-awk.obj `if test -f 'awk.c'; then $(CYGPATH_W) 'awk.c'; else $(CYGPATH_W) '$(srcdir)/awk.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/qseawk-awk.Tpo $(DEPDIR)/qseawk-awk.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='awk.c' object='qseawk-awk.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(qseawk_CFLAGS) $(CFLAGS) -c -o qseawk-awk.obj `if test -f 'awk.c'; then $(CYGPATH_W) 'awk.c'; else $(CYGPATH_W) '$(srcdir)/awk.c'; fi`
+
mostlyclean-libtool:
-rm -f *.lo
diff --git a/qse/cmd/awk/awk.c b/qse/cmd/awk/awk.c
index 662dbbcf..a92f0b3d 100644
--- a/qse/cmd/awk/awk.c
+++ b/qse/cmd/awk/awk.c
@@ -36,6 +36,7 @@
#include
#include
#include
+#include
#include
#include
@@ -49,11 +50,7 @@
#if defined(_WIN32)
# include
# include
-# include
-# include
#elif defined(__OS2__)
-# define INCL_DOSPROCESS
-# define INCL_DOSEXCEPTIONS
# define INCL_ERRORS
# include
#elif defined(__DOS__)
@@ -122,57 +119,7 @@ static void dprint (const qse_char_t* fmt, ...)
}
}
-#if defined(_WIN32)
-static BOOL WINAPI stop_run (DWORD ctrl_type)
-{
- if (ctrl_type == CTRL_C_EVENT ||
- ctrl_type == CTRL_CLOSE_EVENT)
- {
- qse_awk_rtx_stop (app_rtx);
- return TRUE;
- }
-
- return FALSE;
-}
-#elif defined(__OS2__)
-
-static ULONG _System stop_run (
- PEXCEPTIONREPORTRECORD p1,
- PEXCEPTIONREGISTRATIONRECORD p2,
- PCONTEXTRECORD p3,
- PVOID pv)
-{
- if (p1->ExceptionNum == XCPT_SIGNAL)
- {
- if (p1->ExceptionInfo[0] == XCPT_SIGNAL_INTR ||
- p1->ExceptionInfo[0] == XCPT_SIGNAL_KILLPROC ||
- p1->ExceptionInfo[0] == XCPT_SIGNAL_BREAK)
- {
- APIRET rc;
-
- qse_awk_rtx_stop (app_rtx);
- rc = DosAcknowledgeSignalException (p1->ExceptionInfo[0]);
- return (rc != NO_ERROR)? 1: XCPT_CONTINUE_EXECUTION;
- }
- }
-
- return XCPT_CONTINUE_SEARCH; /* exception not resolved */
-}
-
-#elif defined(__DOS__)
-
-static void setsignal (int sig, void(*handler)(int))
-{
- signal (sig, handler);
-}
-
-static void stop_run (int sig)
-{
- qse_awk_rtx_stop (app_rtx);
-}
-
-#else
-
+#if !defined(_WIN32) && !defined(__OS2__) && !defined(__DOS__) && defined(SIGPIPE)
static int setsignal (int sig, void(*handler)(int), int restart)
{
struct sigaction sa_int;
@@ -196,50 +143,33 @@ static int setsignal (int sig, void(*handler)(int), int restart)
}
return sigaction (sig, &sa_int, NULL);
}
+#endif
-static void stop_run (int sig)
+static void stop_run (void* arg)
{
+#if !defined(_WIN32) && !defined(__OS2__) && !defined(__DOS__)
int e = errno;
+#endif
+
qse_awk_rtx_stop (app_rtx);
+
+#if !defined(_WIN32) && !defined(__OS2__) && !defined(__DOS__)
errno = e;
+#endif
}
-#endif
-
-#if defined(__OS2__)
-static EXCEPTIONREGISTRATIONRECORD os2_excrr = { 0 };
-#endif
-
static void set_intr_run (void)
{
-#if defined(_WIN32)
- SetConsoleCtrlHandler (stop_run, TRUE);
-#elif defined(__OS2__)
- APIRET rc;
- os2_excrr.ExceptionHandler = (ERR)stop_run;
- rc = DosSetExceptionHandler (&os2_excrr);
- /*if (rc != NO_ERROR)...*/
-#elif defined(__DOS__)
- setsignal (SIGINT, stop_run);
-#else
- /*setsignal (SIGINT, stop_run, 1); TO BE MORE COMPATIBLE WITH WIN32*/
- setsignal (SIGINT, stop_run, 0);
+ qse_setintrhandler (stop_run, QSE_NULL);
+#if !defined(_WIN32) && !defined(__OS2__) && !defined(__DOS__) && defined(SIGPIPE)
setsignal (SIGPIPE, SIG_IGN, 0);
#endif
}
static void unset_intr_run (void)
{
-#if defined(_WIN32)
- SetConsoleCtrlHandler (stop_run, FALSE);
-#elif defined(__OS2__)
- APIRET rc;
- rc = DosUnsetExceptionHandler (&os2_excrr);
- /*if (rc != NO_ERROR) ...*/
-#elif defined(__DOS__)
- setsignal (SIGINT, SIG_DFL);
-#else
- setsignal (SIGINT, SIG_DFL, 1);
+ qse_clearintrhandler ();
+#if !defined(_WIN32) && !defined(__OS2__) && !defined(__DOS__) && defined(SIGPIPE)
setsignal (SIGPIPE, SIG_DFL, 0);
#endif
}
diff --git a/qse/cmd/sed/Makefile.am b/qse/cmd/sed/Makefile.am
index 48e2a244..5e84c0ac 100644
--- a/qse/cmd/sed/Makefile.am
+++ b/qse/cmd/sed/Makefile.am
@@ -7,8 +7,9 @@ AM_CPPFLAGS = \
bin_PROGRAMS = qsesed
qsesed_SOURCES = sed.c
-qsesed_LDFLAGS = -L../../lib/sed -L../../lib/cmn
-qsesed_LDADD = -lqsesed -lqsecmn
+qsesed_CFLAGS = $(PTHREAD_CFLAGS)
+qsesed_LDFLAGS = -L../../lib/sed -L../../lib/sys -L../../lib/cmn
+qsesed_LDADD = -lqsesed -lqsesys -lqsecmn $(PTHREAD_LIBS)
if WIN32
if WCHAR
diff --git a/qse/cmd/sed/Makefile.in b/qse/cmd/sed/Makefile.in
index 65de6ac5..250c9cf1 100644
--- a/qse/cmd/sed/Makefile.in
+++ b/qse/cmd/sed/Makefile.in
@@ -100,17 +100,17 @@ CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
am__installdirs = "$(DESTDIR)$(bindir)"
PROGRAMS = $(bin_PROGRAMS)
-am_qsesed_OBJECTS = sed.$(OBJEXT)
+am_qsesed_OBJECTS = qsesed-sed.$(OBJEXT)
qsesed_OBJECTS = $(am_qsesed_OBJECTS)
am__DEPENDENCIES_1 =
@WCHAR_TRUE@@WIN32_TRUE@am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1)
-qsesed_DEPENDENCIES = $(am__DEPENDENCIES_2)
+qsesed_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2)
AM_V_lt = $(am__v_lt_@AM_V@)
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
am__v_lt_0 = --silent
am__v_lt_1 =
qsesed_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
- $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(qsesed_CFLAGS) $(CFLAGS) \
$(qsesed_LDFLAGS) $(LDFLAGS) -o $@
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
@@ -354,8 +354,10 @@ AM_CPPFLAGS = \
-I$(top_srcdir)/include
qsesed_SOURCES = sed.c
-qsesed_LDFLAGS = -L../../lib/sed -L../../lib/cmn
-qsesed_LDADD = -lqsesed -lqsecmn $(am__append_1)
+qsesed_CFLAGS = $(PTHREAD_CFLAGS)
+qsesed_LDFLAGS = -L../../lib/sed -L../../lib/sys -L../../lib/cmn
+qsesed_LDADD = -lqsesed -lqsesys -lqsecmn $(PTHREAD_LIBS) \
+ $(am__append_1)
all: all-am
.SUFFIXES:
@@ -450,7 +452,7 @@ mostlyclean-compile:
distclean-compile:
-rm -f *.tab.c
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sed.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/qsesed-sed.Po@am__quote@
.c.o:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@@ -473,6 +475,20 @@ distclean-compile:
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
+qsesed-sed.o: sed.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(qsesed_CFLAGS) $(CFLAGS) -MT qsesed-sed.o -MD -MP -MF $(DEPDIR)/qsesed-sed.Tpo -c -o qsesed-sed.o `test -f 'sed.c' || echo '$(srcdir)/'`sed.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/qsesed-sed.Tpo $(DEPDIR)/qsesed-sed.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sed.c' object='qsesed-sed.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(qsesed_CFLAGS) $(CFLAGS) -c -o qsesed-sed.o `test -f 'sed.c' || echo '$(srcdir)/'`sed.c
+
+qsesed-sed.obj: sed.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(qsesed_CFLAGS) $(CFLAGS) -MT qsesed-sed.obj -MD -MP -MF $(DEPDIR)/qsesed-sed.Tpo -c -o qsesed-sed.obj `if test -f 'sed.c'; then $(CYGPATH_W) 'sed.c'; else $(CYGPATH_W) '$(srcdir)/sed.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/qsesed-sed.Tpo $(DEPDIR)/qsesed-sed.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sed.c' object='qsesed-sed.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(qsesed_CFLAGS) $(CFLAGS) -c -o qsesed-sed.obj `if test -f 'sed.c'; then $(CYGPATH_W) 'sed.c'; else $(CYGPATH_W) '$(srcdir)/sed.c'; fi`
+
mostlyclean-libtool:
-rm -f *.lo
diff --git a/qse/cmd/sed/sed.c b/qse/cmd/sed/sed.c
index d2bd24c3..f828dbc2 100644
--- a/qse/cmd/sed/sed.c
+++ b/qse/cmd/sed/sed.c
@@ -37,17 +37,14 @@
#include
#include
#include
+#include
#include
#include
#if defined(_WIN32)
# include
-# include
-# include
#elif defined(__OS2__)
-# define INCL_DOSPROCESS
-# define INCL_DOSEXCEPTIONS
# define INCL_ERRORS
# include
# include
@@ -71,7 +68,7 @@ static struct
0,
0
};
-
+
static qse_char_t* g_output_file = QSE_NULL;
static int g_infile_pos = 0;
static int g_option = 0;
@@ -462,57 +459,8 @@ void print_exec_error (qse_sed_t* sed)
}
}
-#if defined(_WIN32)
-static BOOL WINAPI stop_run (DWORD ctrl_type)
-{
- if (ctrl_type == CTRL_C_EVENT ||
- ctrl_type == CTRL_CLOSE_EVENT)
- {
- qse_sed_stop (g_sed);
- return TRUE;
- }
-
- return FALSE;
-}
-#elif defined(__OS2__)
-
-static ULONG _System stop_run (
- PEXCEPTIONREPORTRECORD p1,
- PEXCEPTIONREGISTRATIONRECORD p2,
- PCONTEXTRECORD p3,
- PVOID pv)
-{
- if (p1->ExceptionNum == XCPT_SIGNAL)
- {
- if (p1->ExceptionInfo[0] == XCPT_SIGNAL_INTR ||
- p1->ExceptionInfo[0] == XCPT_SIGNAL_KILLPROC ||
- p1->ExceptionInfo[0] == XCPT_SIGNAL_BREAK)
- {
- APIRET rc;
-
- qse_sed_stop (g_sed);
- rc = DosAcknowledgeSignalException (p1->ExceptionInfo[0]);
- return (rc != NO_ERROR)? 1: XCPT_CONTINUE_EXECUTION;
- }
- }
-
- return XCPT_CONTINUE_SEARCH; /* exception not resolved */
-}
-
-#elif defined(__DOS__)
-
-static void setsignal (int sig, void(*handler)(int))
-{
- signal (sig, handler);
-}
-
-static void stop_run (int sig)
-{
- qse_sed_stop (g_sed);
-}
-
-#else
+#if !defined(_WIN32) && !defined(__OS2__) && !defined(__DOS__) && defined(SIGPIPE)
static int setsignal (int sig, void(*handler)(int), int restart)
{
struct sigaction sa_int;
@@ -536,52 +484,38 @@ static int setsignal (int sig, void(*handler)(int), int restart)
}
return sigaction (sig, &sa_int, NULL);
}
+#endif
-static void stop_run (int sig)
+static void stop_run (void* arg)
{
+#if !defined(_WIN32) && !defined(__OS2__) && !defined(__DOS__)
int e = errno;
+#endif
+
qse_sed_stop (g_sed);
+
+#if !defined(_WIN32) && !defined(__OS2__) && !defined(__DOS__)
errno = e;
+#endif
}
-#endif
-
-#if defined(__OS2__)
-static EXCEPTIONREGISTRATIONRECORD os2_excrr = { 0 };
-#endif
-
static void set_intr_run (void)
{
-#if defined(_WIN32)
- SetConsoleCtrlHandler (stop_run, TRUE);
-#elif defined(__OS2__)
- APIRET rc;
- os2_excrr.ExceptionHandler = (ERR)stop_run;
- rc = DosSetExceptionHandler (&os2_excrr);
- /*if (rc != NO_ERROR)...*/
-#elif defined(__DOS__)
- setsignal (SIGINT, stop_run);
-#else
- /*setsignal (SIGINT, stop_run, 1); TO BE MORE COMPATIBLE WITH WIN32*/
- setsignal (SIGINT, stop_run, 0);
+ qse_setintrhandler (stop_run, QSE_NULL);
+#if !defined(_WIN32) && !defined(__OS2__) && !defined(__DOS__) && defined(SIGPIPE)
+ setsignal (SIGPIPE, SIG_IGN, 0);
#endif
}
static void unset_intr_run (void)
{
-#if defined(_WIN32)
- SetConsoleCtrlHandler (stop_run, FALSE);
-#elif defined(__OS2__)
- APIRET rc;
- rc = DosUnsetExceptionHandler (&os2_excrr);
- /*if (rc != NO_ERROR) ...*/
-#elif defined(__DOS__)
- setsignal (SIGINT, SIG_DFL);
-#else
- setsignal (SIGINT, SIG_DFL, 1);
+ qse_clearintrhandler ();
+#if !defined(_WIN32) && !defined(__OS2__) && !defined(__DOS__) && defined(SIGPIPE)
+ setsignal (SIGPIPE, SIG_DFL, 0);
#endif
}
+
#if defined(QSE_ENABLE_SEDTRACER)
static void trace_exec (qse_sed_t* sed, qse_sed_tracer_op_t op, const qse_sed_cmd_t* cmd)
{