renamed ase to qse
This commit is contained in:
7520
qse/aclocal.m4
vendored
Normal file
7520
qse/aclocal.m4
vendored
Normal file
File diff suppressed because it is too large
Load Diff
22
qse/ase.bdsgroup
Normal file
22
qse/ase.bdsgroup
Normal file
@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<BorlandProject>
|
||||
<PersonalityInfo>
|
||||
<Option>
|
||||
<Option Name="Personality">Default.Personality</Option>
|
||||
<Option Name="ProjectType"></Option>
|
||||
<Option Name="Version">1.0</Option>
|
||||
<Option Name="GUID">{AEC503C7-4ABE-4581-B864-3F9D5490DBAC}</Option>
|
||||
</Option>
|
||||
</PersonalityInfo>
|
||||
<Default.Personality> <Projects>
|
||||
<Projects Name="asecmn.lib">cmn\asecmn.bdsproj</Projects>
|
||||
<Projects Name="aseawk.lib">awk\aseawk.bdsproj</Projects>
|
||||
<Projects Name="aseawk++.lib">awk\aseawk++.bdsproj</Projects>
|
||||
<Projects Name="aseutl.lib">utl\aseutl.bdsproj</Projects>
|
||||
<Projects Name="aseawk.exe">cmd\awk\aseawk.bdsproj</Projects>
|
||||
<Projects Name="aseawk++.exe">cmd\awk\aseawk++.bdsproj</Projects>
|
||||
<Projects Name="Targets">asecmn.lib aseawk.lib aseawk++.lib aseutl.lib aseawk.exe aseawk++.exe</Projects>
|
||||
</Projects>
|
||||
<Dependencies/>
|
||||
</Default.Personality>
|
||||
</BorlandProject>
|
137
qse/ase.dsw
Normal file
137
qse/ase.dsw
Normal file
@ -0,0 +1,137 @@
|
||||
Microsoft Developer Studio Workspace File, Format Version 6.00
|
||||
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "asecmn"=.\cmn\asecmn.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "aseutl"=.\utl\aseutl.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "aseawk"=.\awk\aseawk.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "aseawk_jni"=.\awk\aseawk_jni.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "aseawk++"=.\awk\aseawk++.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "asecom"=.\com\asecom.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "asetestawk"=.\cmd\awk\asetestawk.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "asetestawk++"=.\cmd\awk\asetestawk++.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "aselsp"=.\lsp\aselsp.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "asetestlsp"=.\cmd\lsp\asetestlsp.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Global:
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<3>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
247
qse/ase.sln
Normal file
247
qse/ase.sln
Normal file
@ -0,0 +1,247 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 9.00
|
||||
# Visual Studio 2005
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "asecmn", "cmn\asecmn.vcproj", "{17621C83-40C9-4305-BAF9-132E250B5FE3}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "aseutl", "utl\aseutl.vcproj", "{C3EBBFAE-9D08-4FA2-8B0E-D09BEBF84EDD}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "aseawk", "awk\aseawk.vcproj", "{5F2E77D5-1485-48D1-9371-987BC55FEE83}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{17621C83-40C9-4305-BAF9-132E250B5FE3} = {17621C83-40C9-4305-BAF9-132E250B5FE3}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "aseawk_jni", "awk\aseawk_jni.vcproj", "{23B58791-FD44-4F95-9F77-34E4AF45A296}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{5F2E77D5-1485-48D1-9371-987BC55FEE83} = {5F2E77D5-1485-48D1-9371-987BC55FEE83}
|
||||
{C3EBBFAE-9D08-4FA2-8B0E-D09BEBF84EDD} = {C3EBBFAE-9D08-4FA2-8B0E-D09BEBF84EDD}
|
||||
{17621C83-40C9-4305-BAF9-132E250B5FE3} = {17621C83-40C9-4305-BAF9-132E250B5FE3}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "asecom", "com\asecom.vcproj", "{963AF7B5-12E6-42B6-8CBE-89136C1A109B}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{5F2E77D5-1485-48D1-9371-987BC55FEE83} = {5F2E77D5-1485-48D1-9371-987BC55FEE83}
|
||||
{C3EBBFAE-9D08-4FA2-8B0E-D09BEBF84EDD} = {C3EBBFAE-9D08-4FA2-8B0E-D09BEBF84EDD}
|
||||
{17621C83-40C9-4305-BAF9-132E250B5FE3} = {17621C83-40C9-4305-BAF9-132E250B5FE3}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "aseawk", "cmd\awk\aseawk.vcproj", "{57F1E1D0-28B6-42BF-BAFB-045AEE2DCF4F}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{5F2E77D5-1485-48D1-9371-987BC55FEE83} = {5F2E77D5-1485-48D1-9371-987BC55FEE83}
|
||||
{C3EBBFAE-9D08-4FA2-8B0E-D09BEBF84EDD} = {C3EBBFAE-9D08-4FA2-8B0E-D09BEBF84EDD}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "aselsp", "lsp\aselsp.vcproj", "{42FE7CED-34B7-45C8-92C9-8856E16640D2}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{17621C83-40C9-4305-BAF9-132E250B5FE3} = {17621C83-40C9-4305-BAF9-132E250B5FE3}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "aselsp", "cmd\lsp\aselsp.vcproj", "{868702B0-CB6B-4F1D-B98A-32193347EFAF}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{42FE7CED-34B7-45C8-92C9-8856E16640D2} = {42FE7CED-34B7-45C8-92C9-8856E16640D2}
|
||||
{C3EBBFAE-9D08-4FA2-8B0E-D09BEBF84EDD} = {C3EBBFAE-9D08-4FA2-8B0E-D09BEBF84EDD}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "aseawk++", "awk\aseawk++.vcproj", "{E7A8B741-4E9D-4ED4-9F77-E7F637A678A5}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{5F2E77D5-1485-48D1-9371-987BC55FEE83} = {5F2E77D5-1485-48D1-9371-987BC55FEE83}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "aseawk++", "cmd\awk\aseawk++.vcproj", "{3BEA6CFE-C158-4BFB-B5FB-ED85251E3F98}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{C3EBBFAE-9D08-4FA2-8B0E-D09BEBF84EDD} = {C3EBBFAE-9D08-4FA2-8B0E-D09BEBF84EDD}
|
||||
{E7A8B741-4E9D-4ED4-9F77-E7F637A678A5} = {E7A8B741-4E9D-4ED4-9F77-E7F637A678A5}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "asenet", "net\asenet.vcproj", "{A63E9DF9-1D47-4D81-834C-1D40406C18C4}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{E7A8B741-4E9D-4ED4-9F77-E7F637A678A5} = {E7A8B741-4E9D-4ED4-9F77-E7F637A678A5}
|
||||
{C3EBBFAE-9D08-4FA2-8B0E-D09BEBF84EDD} = {C3EBBFAE-9D08-4FA2-8B0E-D09BEBF84EDD}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "asenet", "cmd\net\asenet.csproj", "{7CC01C3D-FC1A-4587-868A-7FC4449B3F8B}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "cmd", "cmd", "{8A2F5860-6563-4617-BCE0-460F915007F8}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "asecom", "cmd\com\asecom.csproj", "{F14B75D8-3ED7-4621-B5B9-E96A80B5D809}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{963AF7B5-12E6-42B6-8CBE-89136C1A109B} = {963AF7B5-12E6-42B6-8CBE-89136C1A109B}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Debug|Win32 = Debug|Win32
|
||||
Debug|x64 = Debug|x64
|
||||
Release|Any CPU = Release|Any CPU
|
||||
Release|Win32 = Release|Win32
|
||||
Release|x64 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{17621C83-40C9-4305-BAF9-132E250B5FE3}.Debug|Any CPU.ActiveCfg = Debug|Win32
|
||||
{17621C83-40C9-4305-BAF9-132E250B5FE3}.Debug|Any CPU.Build.0 = Debug|Win32
|
||||
{17621C83-40C9-4305-BAF9-132E250B5FE3}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{17621C83-40C9-4305-BAF9-132E250B5FE3}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{17621C83-40C9-4305-BAF9-132E250B5FE3}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{17621C83-40C9-4305-BAF9-132E250B5FE3}.Debug|x64.Build.0 = Debug|x64
|
||||
{17621C83-40C9-4305-BAF9-132E250B5FE3}.Release|Any CPU.ActiveCfg = Release|Win32
|
||||
{17621C83-40C9-4305-BAF9-132E250B5FE3}.Release|Any CPU.Build.0 = Release|Win32
|
||||
{17621C83-40C9-4305-BAF9-132E250B5FE3}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{17621C83-40C9-4305-BAF9-132E250B5FE3}.Release|Win32.Build.0 = Release|Win32
|
||||
{17621C83-40C9-4305-BAF9-132E250B5FE3}.Release|x64.ActiveCfg = Release|x64
|
||||
{17621C83-40C9-4305-BAF9-132E250B5FE3}.Release|x64.Build.0 = Release|x64
|
||||
{C3EBBFAE-9D08-4FA2-8B0E-D09BEBF84EDD}.Debug|Any CPU.ActiveCfg = Debug|Win32
|
||||
{C3EBBFAE-9D08-4FA2-8B0E-D09BEBF84EDD}.Debug|Any CPU.Build.0 = Debug|Win32
|
||||
{C3EBBFAE-9D08-4FA2-8B0E-D09BEBF84EDD}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{C3EBBFAE-9D08-4FA2-8B0E-D09BEBF84EDD}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{C3EBBFAE-9D08-4FA2-8B0E-D09BEBF84EDD}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{C3EBBFAE-9D08-4FA2-8B0E-D09BEBF84EDD}.Debug|x64.Build.0 = Debug|x64
|
||||
{C3EBBFAE-9D08-4FA2-8B0E-D09BEBF84EDD}.Release|Any CPU.ActiveCfg = Release|Win32
|
||||
{C3EBBFAE-9D08-4FA2-8B0E-D09BEBF84EDD}.Release|Any CPU.Build.0 = Release|Win32
|
||||
{C3EBBFAE-9D08-4FA2-8B0E-D09BEBF84EDD}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{C3EBBFAE-9D08-4FA2-8B0E-D09BEBF84EDD}.Release|Win32.Build.0 = Release|Win32
|
||||
{C3EBBFAE-9D08-4FA2-8B0E-D09BEBF84EDD}.Release|x64.ActiveCfg = Release|x64
|
||||
{C3EBBFAE-9D08-4FA2-8B0E-D09BEBF84EDD}.Release|x64.Build.0 = Release|x64
|
||||
{5F2E77D5-1485-48D1-9371-987BC55FEE83}.Debug|Any CPU.ActiveCfg = Debug|Win32
|
||||
{5F2E77D5-1485-48D1-9371-987BC55FEE83}.Debug|Any CPU.Build.0 = Debug|Win32
|
||||
{5F2E77D5-1485-48D1-9371-987BC55FEE83}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{5F2E77D5-1485-48D1-9371-987BC55FEE83}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{5F2E77D5-1485-48D1-9371-987BC55FEE83}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{5F2E77D5-1485-48D1-9371-987BC55FEE83}.Debug|x64.Build.0 = Debug|x64
|
||||
{5F2E77D5-1485-48D1-9371-987BC55FEE83}.Release|Any CPU.ActiveCfg = Release|Win32
|
||||
{5F2E77D5-1485-48D1-9371-987BC55FEE83}.Release|Any CPU.Build.0 = Release|Win32
|
||||
{5F2E77D5-1485-48D1-9371-987BC55FEE83}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{5F2E77D5-1485-48D1-9371-987BC55FEE83}.Release|Win32.Build.0 = Release|Win32
|
||||
{5F2E77D5-1485-48D1-9371-987BC55FEE83}.Release|x64.ActiveCfg = Release|x64
|
||||
{5F2E77D5-1485-48D1-9371-987BC55FEE83}.Release|x64.Build.0 = Release|x64
|
||||
{23B58791-FD44-4F95-9F77-34E4AF45A296}.Debug|Any CPU.ActiveCfg = Debug|Win32
|
||||
{23B58791-FD44-4F95-9F77-34E4AF45A296}.Debug|Any CPU.Build.0 = Debug|Win32
|
||||
{23B58791-FD44-4F95-9F77-34E4AF45A296}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{23B58791-FD44-4F95-9F77-34E4AF45A296}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{23B58791-FD44-4F95-9F77-34E4AF45A296}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{23B58791-FD44-4F95-9F77-34E4AF45A296}.Debug|x64.Build.0 = Debug|x64
|
||||
{23B58791-FD44-4F95-9F77-34E4AF45A296}.Release|Any CPU.ActiveCfg = Release|Win32
|
||||
{23B58791-FD44-4F95-9F77-34E4AF45A296}.Release|Any CPU.Build.0 = Release|Win32
|
||||
{23B58791-FD44-4F95-9F77-34E4AF45A296}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{23B58791-FD44-4F95-9F77-34E4AF45A296}.Release|Win32.Build.0 = Release|Win32
|
||||
{23B58791-FD44-4F95-9F77-34E4AF45A296}.Release|x64.ActiveCfg = Release|x64
|
||||
{23B58791-FD44-4F95-9F77-34E4AF45A296}.Release|x64.Build.0 = Release|x64
|
||||
{963AF7B5-12E6-42B6-8CBE-89136C1A109B}.Debug|Any CPU.ActiveCfg = Debug|Win32
|
||||
{963AF7B5-12E6-42B6-8CBE-89136C1A109B}.Debug|Any CPU.Build.0 = Debug|Win32
|
||||
{963AF7B5-12E6-42B6-8CBE-89136C1A109B}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{963AF7B5-12E6-42B6-8CBE-89136C1A109B}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{963AF7B5-12E6-42B6-8CBE-89136C1A109B}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{963AF7B5-12E6-42B6-8CBE-89136C1A109B}.Debug|x64.Build.0 = Debug|x64
|
||||
{963AF7B5-12E6-42B6-8CBE-89136C1A109B}.Release|Any CPU.ActiveCfg = Release|Win32
|
||||
{963AF7B5-12E6-42B6-8CBE-89136C1A109B}.Release|Any CPU.Build.0 = Release|Win32
|
||||
{963AF7B5-12E6-42B6-8CBE-89136C1A109B}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{963AF7B5-12E6-42B6-8CBE-89136C1A109B}.Release|Win32.Build.0 = Release|Win32
|
||||
{963AF7B5-12E6-42B6-8CBE-89136C1A109B}.Release|x64.ActiveCfg = Release|x64
|
||||
{963AF7B5-12E6-42B6-8CBE-89136C1A109B}.Release|x64.Build.0 = Release|x64
|
||||
{57F1E1D0-28B6-42BF-BAFB-045AEE2DCF4F}.Debug|Any CPU.ActiveCfg = Debug|Win32
|
||||
{57F1E1D0-28B6-42BF-BAFB-045AEE2DCF4F}.Debug|Any CPU.Build.0 = Debug|Win32
|
||||
{57F1E1D0-28B6-42BF-BAFB-045AEE2DCF4F}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{57F1E1D0-28B6-42BF-BAFB-045AEE2DCF4F}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{57F1E1D0-28B6-42BF-BAFB-045AEE2DCF4F}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{57F1E1D0-28B6-42BF-BAFB-045AEE2DCF4F}.Debug|x64.Build.0 = Debug|x64
|
||||
{57F1E1D0-28B6-42BF-BAFB-045AEE2DCF4F}.Release|Any CPU.ActiveCfg = Release|Win32
|
||||
{57F1E1D0-28B6-42BF-BAFB-045AEE2DCF4F}.Release|Any CPU.Build.0 = Release|Win32
|
||||
{57F1E1D0-28B6-42BF-BAFB-045AEE2DCF4F}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{57F1E1D0-28B6-42BF-BAFB-045AEE2DCF4F}.Release|Win32.Build.0 = Release|Win32
|
||||
{57F1E1D0-28B6-42BF-BAFB-045AEE2DCF4F}.Release|x64.ActiveCfg = Release|x64
|
||||
{57F1E1D0-28B6-42BF-BAFB-045AEE2DCF4F}.Release|x64.Build.0 = Release|x64
|
||||
{42FE7CED-34B7-45C8-92C9-8856E16640D2}.Debug|Any CPU.ActiveCfg = Debug|Win32
|
||||
{42FE7CED-34B7-45C8-92C9-8856E16640D2}.Debug|Any CPU.Build.0 = Debug|Win32
|
||||
{42FE7CED-34B7-45C8-92C9-8856E16640D2}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{42FE7CED-34B7-45C8-92C9-8856E16640D2}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{42FE7CED-34B7-45C8-92C9-8856E16640D2}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{42FE7CED-34B7-45C8-92C9-8856E16640D2}.Debug|x64.Build.0 = Debug|x64
|
||||
{42FE7CED-34B7-45C8-92C9-8856E16640D2}.Release|Any CPU.ActiveCfg = Release|Win32
|
||||
{42FE7CED-34B7-45C8-92C9-8856E16640D2}.Release|Any CPU.Build.0 = Release|Win32
|
||||
{42FE7CED-34B7-45C8-92C9-8856E16640D2}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{42FE7CED-34B7-45C8-92C9-8856E16640D2}.Release|Win32.Build.0 = Release|Win32
|
||||
{42FE7CED-34B7-45C8-92C9-8856E16640D2}.Release|x64.ActiveCfg = Release|x64
|
||||
{42FE7CED-34B7-45C8-92C9-8856E16640D2}.Release|x64.Build.0 = Release|x64
|
||||
{868702B0-CB6B-4F1D-B98A-32193347EFAF}.Debug|Any CPU.ActiveCfg = Debug|Win32
|
||||
{868702B0-CB6B-4F1D-B98A-32193347EFAF}.Debug|Any CPU.Build.0 = Debug|Win32
|
||||
{868702B0-CB6B-4F1D-B98A-32193347EFAF}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{868702B0-CB6B-4F1D-B98A-32193347EFAF}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{868702B0-CB6B-4F1D-B98A-32193347EFAF}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{868702B0-CB6B-4F1D-B98A-32193347EFAF}.Debug|x64.Build.0 = Debug|x64
|
||||
{868702B0-CB6B-4F1D-B98A-32193347EFAF}.Release|Any CPU.ActiveCfg = Release|Win32
|
||||
{868702B0-CB6B-4F1D-B98A-32193347EFAF}.Release|Any CPU.Build.0 = Release|Win32
|
||||
{868702B0-CB6B-4F1D-B98A-32193347EFAF}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{868702B0-CB6B-4F1D-B98A-32193347EFAF}.Release|Win32.Build.0 = Release|Win32
|
||||
{868702B0-CB6B-4F1D-B98A-32193347EFAF}.Release|x64.ActiveCfg = Release|x64
|
||||
{868702B0-CB6B-4F1D-B98A-32193347EFAF}.Release|x64.Build.0 = Release|x64
|
||||
{E7A8B741-4E9D-4ED4-9F77-E7F637A678A5}.Debug|Any CPU.ActiveCfg = Debug|Win32
|
||||
{E7A8B741-4E9D-4ED4-9F77-E7F637A678A5}.Debug|Any CPU.Build.0 = Debug|Win32
|
||||
{E7A8B741-4E9D-4ED4-9F77-E7F637A678A5}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{E7A8B741-4E9D-4ED4-9F77-E7F637A678A5}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{E7A8B741-4E9D-4ED4-9F77-E7F637A678A5}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{E7A8B741-4E9D-4ED4-9F77-E7F637A678A5}.Debug|x64.Build.0 = Debug|x64
|
||||
{E7A8B741-4E9D-4ED4-9F77-E7F637A678A5}.Release|Any CPU.ActiveCfg = Release|Win32
|
||||
{E7A8B741-4E9D-4ED4-9F77-E7F637A678A5}.Release|Any CPU.Build.0 = Release|Win32
|
||||
{E7A8B741-4E9D-4ED4-9F77-E7F637A678A5}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{E7A8B741-4E9D-4ED4-9F77-E7F637A678A5}.Release|Win32.Build.0 = Release|Win32
|
||||
{E7A8B741-4E9D-4ED4-9F77-E7F637A678A5}.Release|x64.ActiveCfg = Release|x64
|
||||
{E7A8B741-4E9D-4ED4-9F77-E7F637A678A5}.Release|x64.Build.0 = Release|x64
|
||||
{3BEA6CFE-C158-4BFB-B5FB-ED85251E3F98}.Debug|Any CPU.ActiveCfg = Debug|Win32
|
||||
{3BEA6CFE-C158-4BFB-B5FB-ED85251E3F98}.Debug|Any CPU.Build.0 = Debug|Win32
|
||||
{3BEA6CFE-C158-4BFB-B5FB-ED85251E3F98}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{3BEA6CFE-C158-4BFB-B5FB-ED85251E3F98}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{3BEA6CFE-C158-4BFB-B5FB-ED85251E3F98}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{3BEA6CFE-C158-4BFB-B5FB-ED85251E3F98}.Debug|x64.Build.0 = Debug|x64
|
||||
{3BEA6CFE-C158-4BFB-B5FB-ED85251E3F98}.Release|Any CPU.ActiveCfg = Release|Win32
|
||||
{3BEA6CFE-C158-4BFB-B5FB-ED85251E3F98}.Release|Any CPU.Build.0 = Release|Win32
|
||||
{3BEA6CFE-C158-4BFB-B5FB-ED85251E3F98}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{3BEA6CFE-C158-4BFB-B5FB-ED85251E3F98}.Release|Win32.Build.0 = Release|Win32
|
||||
{3BEA6CFE-C158-4BFB-B5FB-ED85251E3F98}.Release|x64.ActiveCfg = Release|x64
|
||||
{3BEA6CFE-C158-4BFB-B5FB-ED85251E3F98}.Release|x64.Build.0 = Release|x64
|
||||
{A63E9DF9-1D47-4D81-834C-1D40406C18C4}.Debug|Any CPU.ActiveCfg = Debug|Win32
|
||||
{A63E9DF9-1D47-4D81-834C-1D40406C18C4}.Debug|Any CPU.Build.0 = Debug|Win32
|
||||
{A63E9DF9-1D47-4D81-834C-1D40406C18C4}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{A63E9DF9-1D47-4D81-834C-1D40406C18C4}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{A63E9DF9-1D47-4D81-834C-1D40406C18C4}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{A63E9DF9-1D47-4D81-834C-1D40406C18C4}.Debug|x64.Build.0 = Debug|x64
|
||||
{A63E9DF9-1D47-4D81-834C-1D40406C18C4}.Release|Any CPU.ActiveCfg = Release|Win32
|
||||
{A63E9DF9-1D47-4D81-834C-1D40406C18C4}.Release|Any CPU.Build.0 = Release|Win32
|
||||
{A63E9DF9-1D47-4D81-834C-1D40406C18C4}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{A63E9DF9-1D47-4D81-834C-1D40406C18C4}.Release|Win32.Build.0 = Release|Win32
|
||||
{A63E9DF9-1D47-4D81-834C-1D40406C18C4}.Release|x64.ActiveCfg = Release|x64
|
||||
{A63E9DF9-1D47-4D81-834C-1D40406C18C4}.Release|x64.Build.0 = Release|x64
|
||||
{7CC01C3D-FC1A-4587-868A-7FC4449B3F8B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{7CC01C3D-FC1A-4587-868A-7FC4449B3F8B}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{7CC01C3D-FC1A-4587-868A-7FC4449B3F8B}.Debug|Win32.ActiveCfg = Debug|Any CPU
|
||||
{7CC01C3D-FC1A-4587-868A-7FC4449B3F8B}.Debug|Win32.Build.0 = Debug|Any CPU
|
||||
{7CC01C3D-FC1A-4587-868A-7FC4449B3F8B}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{7CC01C3D-FC1A-4587-868A-7FC4449B3F8B}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{7CC01C3D-FC1A-4587-868A-7FC4449B3F8B}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{7CC01C3D-FC1A-4587-868A-7FC4449B3F8B}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{7CC01C3D-FC1A-4587-868A-7FC4449B3F8B}.Release|Win32.ActiveCfg = Release|Any CPU
|
||||
{7CC01C3D-FC1A-4587-868A-7FC4449B3F8B}.Release|Win32.Build.0 = Release|Any CPU
|
||||
{7CC01C3D-FC1A-4587-868A-7FC4449B3F8B}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{7CC01C3D-FC1A-4587-868A-7FC4449B3F8B}.Release|x64.Build.0 = Release|Any CPU
|
||||
{F14B75D8-3ED7-4621-B5B9-E96A80B5D809}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{F14B75D8-3ED7-4621-B5B9-E96A80B5D809}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{F14B75D8-3ED7-4621-B5B9-E96A80B5D809}.Debug|Win32.ActiveCfg = Debug|Any CPU
|
||||
{F14B75D8-3ED7-4621-B5B9-E96A80B5D809}.Debug|Win32.Build.0 = Debug|Any CPU
|
||||
{F14B75D8-3ED7-4621-B5B9-E96A80B5D809}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{F14B75D8-3ED7-4621-B5B9-E96A80B5D809}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{F14B75D8-3ED7-4621-B5B9-E96A80B5D809}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{F14B75D8-3ED7-4621-B5B9-E96A80B5D809}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{F14B75D8-3ED7-4621-B5B9-E96A80B5D809}.Release|Win32.ActiveCfg = Release|Any CPU
|
||||
{F14B75D8-3ED7-4621-B5B9-E96A80B5D809}.Release|Win32.Build.0 = Release|Any CPU
|
||||
{F14B75D8-3ED7-4621-B5B9-E96A80B5D809}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{F14B75D8-3ED7-4621-B5B9-E96A80B5D809}.Release|x64.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(NestedProjects) = preSolution
|
||||
{868702B0-CB6B-4F1D-B98A-32193347EFAF} = {8A2F5860-6563-4617-BCE0-460F915007F8}
|
||||
{3BEA6CFE-C158-4BFB-B5FB-ED85251E3F98} = {8A2F5860-6563-4617-BCE0-460F915007F8}
|
||||
{7CC01C3D-FC1A-4587-868A-7FC4449B3F8B} = {8A2F5860-6563-4617-BCE0-460F915007F8}
|
||||
{57F1E1D0-28B6-42BF-BAFB-045AEE2DCF4F} = {8A2F5860-6563-4617-BCE0-460F915007F8}
|
||||
{F14B75D8-3ED7-4621-B5B9-E96A80B5D809} = {8A2F5860-6563-4617-BCE0-460F915007F8}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
142
qse/autoconf/compile
Executable file
142
qse/autoconf/compile
Executable file
@ -0,0 +1,142 @@
|
||||
#! /bin/sh
|
||||
# Wrapper for compilers which do not understand `-c -o'.
|
||||
|
||||
scriptversion=2005-05-14.22
|
||||
|
||||
# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
|
||||
# Written by Tom Tromey <tromey@cygnus.com>.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
#
|
||||
# This program 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 General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# This file is maintained in Automake, please report
|
||||
# bugs to <bug-automake@gnu.org> or send patches to
|
||||
# <automake-patches@gnu.org>.
|
||||
|
||||
case $1 in
|
||||
'')
|
||||
echo "$0: No command. Try \`$0 --help' for more information." 1>&2
|
||||
exit 1;
|
||||
;;
|
||||
-h | --h*)
|
||||
cat <<\EOF
|
||||
Usage: compile [--help] [--version] PROGRAM [ARGS]
|
||||
|
||||
Wrapper for compilers which do not understand `-c -o'.
|
||||
Remove `-o dest.o' from ARGS, run PROGRAM with the remaining
|
||||
arguments, and rename the output as expected.
|
||||
|
||||
If you are trying to build a whole package this is not the
|
||||
right script to run: please start by reading the file `INSTALL'.
|
||||
|
||||
Report bugs to <bug-automake@gnu.org>.
|
||||
EOF
|
||||
exit $?
|
||||
;;
|
||||
-v | --v*)
|
||||
echo "compile $scriptversion"
|
||||
exit $?
|
||||
;;
|
||||
esac
|
||||
|
||||
ofile=
|
||||
cfile=
|
||||
eat=
|
||||
|
||||
for arg
|
||||
do
|
||||
if test -n "$eat"; then
|
||||
eat=
|
||||
else
|
||||
case $1 in
|
||||
-o)
|
||||
# configure might choose to run compile as `compile cc -o foo foo.c'.
|
||||
# So we strip `-o arg' only if arg is an object.
|
||||
eat=1
|
||||
case $2 in
|
||||
*.o | *.obj)
|
||||
ofile=$2
|
||||
;;
|
||||
*)
|
||||
set x "$@" -o "$2"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*.c)
|
||||
cfile=$1
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
shift
|
||||
done
|
||||
|
||||
if test -z "$ofile" || test -z "$cfile"; then
|
||||
# If no `-o' option was seen then we might have been invoked from a
|
||||
# pattern rule where we don't need one. That is ok -- this is a
|
||||
# normal compilation that the losing compiler can handle. If no
|
||||
# `.c' file was seen then we are probably linking. That is also
|
||||
# ok.
|
||||
exec "$@"
|
||||
fi
|
||||
|
||||
# Name of file we expect compiler to create.
|
||||
cofile=`echo "$cfile" | sed -e 's|^.*/||' -e 's/\.c$/.o/'`
|
||||
|
||||
# Create the lock directory.
|
||||
# Note: use `[/.-]' here to ensure that we don't use the same name
|
||||
# that we are using for the .o file. Also, base the name on the expected
|
||||
# object file name, since that is what matters with a parallel build.
|
||||
lockdir=`echo "$cofile" | sed -e 's|[/.-]|_|g'`.d
|
||||
while true; do
|
||||
if mkdir "$lockdir" >/dev/null 2>&1; then
|
||||
break
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
# FIXME: race condition here if user kills between mkdir and trap.
|
||||
trap "rmdir '$lockdir'; exit 1" 1 2 15
|
||||
|
||||
# Run the compile.
|
||||
"$@"
|
||||
ret=$?
|
||||
|
||||
if test -f "$cofile"; then
|
||||
mv "$cofile" "$ofile"
|
||||
elif test -f "${cofile}bj"; then
|
||||
mv "${cofile}bj" "$ofile"
|
||||
fi
|
||||
|
||||
rmdir "$lockdir"
|
||||
exit $ret
|
||||
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-end: "$"
|
||||
# End:
|
1516
qse/autoconf/config.guess
vendored
Executable file
1516
qse/autoconf/config.guess
vendored
Executable file
File diff suppressed because it is too large
Load Diff
1626
qse/autoconf/config.sub
vendored
Executable file
1626
qse/autoconf/config.sub
vendored
Executable file
File diff suppressed because it is too large
Load Diff
589
qse/autoconf/depcomp
Executable file
589
qse/autoconf/depcomp
Executable file
@ -0,0 +1,589 @@
|
||||
#! /bin/sh
|
||||
# depcomp - compile a program generating dependencies as side-effects
|
||||
|
||||
scriptversion=2007-03-29.01
|
||||
|
||||
# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007 Free Software
|
||||
# Foundation, Inc.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
|
||||
# This program 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 General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
# 02110-1301, USA.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
|
||||
|
||||
case $1 in
|
||||
'')
|
||||
echo "$0: No command. Try \`$0 --help' for more information." 1>&2
|
||||
exit 1;
|
||||
;;
|
||||
-h | --h*)
|
||||
cat <<\EOF
|
||||
Usage: depcomp [--help] [--version] PROGRAM [ARGS]
|
||||
|
||||
Run PROGRAMS ARGS to compile a file, generating dependencies
|
||||
as side-effects.
|
||||
|
||||
Environment variables:
|
||||
depmode Dependency tracking mode.
|
||||
source Source file read by `PROGRAMS ARGS'.
|
||||
object Object file output by `PROGRAMS ARGS'.
|
||||
DEPDIR directory where to store dependencies.
|
||||
depfile Dependency file to output.
|
||||
tmpdepfile Temporary file to use when outputing dependencies.
|
||||
libtool Whether libtool is used (yes/no).
|
||||
|
||||
Report bugs to <bug-automake@gnu.org>.
|
||||
EOF
|
||||
exit $?
|
||||
;;
|
||||
-v | --v*)
|
||||
echo "depcomp $scriptversion"
|
||||
exit $?
|
||||
;;
|
||||
esac
|
||||
|
||||
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
|
||||
echo "depcomp: Variables source, object and depmode must be set" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
|
||||
depfile=${depfile-`echo "$object" |
|
||||
sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
|
||||
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
|
||||
|
||||
rm -f "$tmpdepfile"
|
||||
|
||||
# Some modes work just like other modes, but use different flags. We
|
||||
# parameterize here, but still list the modes in the big case below,
|
||||
# to make depend.m4 easier to write. Note that we *cannot* use a case
|
||||
# here, because this file can only contain one case statement.
|
||||
if test "$depmode" = hp; then
|
||||
# HP compiler uses -M and no extra arg.
|
||||
gccflag=-M
|
||||
depmode=gcc
|
||||
fi
|
||||
|
||||
if test "$depmode" = dashXmstdout; then
|
||||
# This is just like dashmstdout with a different argument.
|
||||
dashmflag=-xM
|
||||
depmode=dashmstdout
|
||||
fi
|
||||
|
||||
case "$depmode" in
|
||||
gcc3)
|
||||
## gcc 3 implements dependency tracking that does exactly what
|
||||
## we want. Yay! Note: for some reason libtool 1.4 doesn't like
|
||||
## it if -MD -MP comes after the -MF stuff. Hmm.
|
||||
## Unfortunately, FreeBSD c89 acceptance of flags depends upon
|
||||
## the command line argument order; so add the flags where they
|
||||
## appear in depend2.am. Note that the slowdown incurred here
|
||||
## affects only configure: in makefiles, %FASTDEP% shortcuts this.
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
|
||||
*) set fnord "$@" "$arg" ;;
|
||||
esac
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
done
|
||||
"$@"
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
mv "$tmpdepfile" "$depfile"
|
||||
;;
|
||||
|
||||
gcc)
|
||||
## There are various ways to get dependency output from gcc. Here's
|
||||
## why we pick this rather obscure method:
|
||||
## - Don't want to use -MD because we'd like the dependencies to end
|
||||
## up in a subdir. Having to rename by hand is ugly.
|
||||
## (We might end up doing this anyway to support other compilers.)
|
||||
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
|
||||
## -MM, not -M (despite what the docs say).
|
||||
## - Using -M directly means running the compiler twice (even worse
|
||||
## than renaming).
|
||||
if test -z "$gccflag"; then
|
||||
gccflag=-MD,
|
||||
fi
|
||||
"$@" -Wp,"$gccflag$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
|
||||
## The second -e expression handles DOS-style file names with drive letters.
|
||||
sed -e 's/^[^:]*: / /' \
|
||||
-e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
|
||||
## This next piece of magic avoids the `deleted header file' problem.
|
||||
## The problem is that when a header file which appears in a .P file
|
||||
## is deleted, the dependency causes make to die (because there is
|
||||
## typically no way to rebuild the header). We avoid this by adding
|
||||
## dummy dependencies for each header file. Too bad gcc doesn't do
|
||||
## this for us directly.
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" |
|
||||
## Some versions of gcc put a space before the `:'. On the theory
|
||||
## that the space means something, we add a space to the output as
|
||||
## well.
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
hp)
|
||||
# This case exists only to let depend.m4 do its work. It works by
|
||||
# looking at the text of this script. This case will never be run,
|
||||
# since it is checked for above.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
sgi)
|
||||
if test "$libtool" = yes; then
|
||||
"$@" "-Wp,-MDupdate,$tmpdepfile"
|
||||
else
|
||||
"$@" -MDupdate "$tmpdepfile"
|
||||
fi
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
|
||||
if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
|
||||
echo "$object : \\" > "$depfile"
|
||||
|
||||
# Clip off the initial element (the dependent). Don't try to be
|
||||
# clever and replace this with sed code, as IRIX sed won't handle
|
||||
# lines with more than a fixed number of characters (4096 in
|
||||
# IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
|
||||
# the IRIX cc adds comments like `#:fec' to the end of the
|
||||
# dependency line.
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
|
||||
tr '
|
||||
' ' ' >> $depfile
|
||||
echo >> $depfile
|
||||
|
||||
# The second pass generates a dummy entry for each header file.
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
|
||||
>> $depfile
|
||||
else
|
||||
# The sourcefile does not contain any dependencies, so just
|
||||
# store a dummy comment line, to avoid errors with the Makefile
|
||||
# "include basename.Plo" scheme.
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
aix)
|
||||
# The C for AIX Compiler uses -M and outputs the dependencies
|
||||
# in a .u file. In older versions, this file always lives in the
|
||||
# current directory. Also, the AIX compiler puts `$object:' at the
|
||||
# start of each line; $object doesn't have directory information.
|
||||
# Version 6 uses the directory in both cases.
|
||||
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
|
||||
test "x$dir" = "x$object" && dir=
|
||||
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
|
||||
if test "$libtool" = yes; then
|
||||
tmpdepfile1=$dir$base.u
|
||||
tmpdepfile2=$base.u
|
||||
tmpdepfile3=$dir.libs/$base.u
|
||||
"$@" -Wc,-M
|
||||
else
|
||||
tmpdepfile1=$dir$base.u
|
||||
tmpdepfile2=$dir$base.u
|
||||
tmpdepfile3=$dir$base.u
|
||||
"$@" -M
|
||||
fi
|
||||
stat=$?
|
||||
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
do
|
||||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
if test -f "$tmpdepfile"; then
|
||||
# Each line is of the form `foo.o: dependent.h'.
|
||||
# Do two passes, one to just change these to
|
||||
# `$object: dependent.h' and one to simply `dependent.h:'.
|
||||
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
|
||||
# That's a tab and a space in the [].
|
||||
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
# The sourcefile does not contain any dependencies, so just
|
||||
# store a dummy comment line, to avoid errors with the Makefile
|
||||
# "include basename.Plo" scheme.
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
icc)
|
||||
# Intel's C compiler understands `-MD -MF file'. However on
|
||||
# icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
|
||||
# ICC 7.0 will fill foo.d with something like
|
||||
# foo.o: sub/foo.c
|
||||
# foo.o: sub/foo.h
|
||||
# which is wrong. We want:
|
||||
# sub/foo.o: sub/foo.c
|
||||
# sub/foo.o: sub/foo.h
|
||||
# sub/foo.c:
|
||||
# sub/foo.h:
|
||||
# ICC 7.1 will output
|
||||
# foo.o: sub/foo.c sub/foo.h
|
||||
# and will wrap long lines using \ :
|
||||
# foo.o: sub/foo.c ... \
|
||||
# sub/foo.h ... \
|
||||
# ...
|
||||
|
||||
"$@" -MD -MF "$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
# Each line is of the form `foo.o: dependent.h',
|
||||
# or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
|
||||
# Do two passes, one to just change these to
|
||||
# `$object: dependent.h' and one to simply `dependent.h:'.
|
||||
sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
|
||||
# Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
# correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
|
||||
sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
hp2)
|
||||
# The "hp" stanza above does not work with aCC (C++) and HP's ia64
|
||||
# compilers, which have integrated preprocessors. The correct option
|
||||
# to use with these is +Maked; it writes dependencies to a file named
|
||||
# 'foo.d', which lands next to the object file, wherever that
|
||||
# happens to be.
|
||||
# Much of this is similar to the tru64 case; see comments there.
|
||||
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
|
||||
test "x$dir" = "x$object" && dir=
|
||||
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
|
||||
if test "$libtool" = yes; then
|
||||
tmpdepfile1=$dir$base.d
|
||||
tmpdepfile2=$dir.libs/$base.d
|
||||
"$@" -Wc,+Maked
|
||||
else
|
||||
tmpdepfile1=$dir$base.d
|
||||
tmpdepfile2=$dir$base.d
|
||||
"$@" +Maked
|
||||
fi
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
|
||||
do
|
||||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
if test -f "$tmpdepfile"; then
|
||||
sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
|
||||
# Add `dependent.h:' lines.
|
||||
sed -ne '2,${; s/^ *//; s/ \\*$//; s/$/:/; p;}' "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile" "$tmpdepfile2"
|
||||
;;
|
||||
|
||||
tru64)
|
||||
# The Tru64 compiler uses -MD to generate dependencies as a side
|
||||
# effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
|
||||
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
|
||||
# dependencies in `foo.d' instead, so we check for that too.
|
||||
# Subdirectories are respected.
|
||||
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
|
||||
test "x$dir" = "x$object" && dir=
|
||||
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
|
||||
|
||||
if test "$libtool" = yes; then
|
||||
# With Tru64 cc, shared objects can also be used to make a
|
||||
# static library. This mechanism is used in libtool 1.4 series to
|
||||
# handle both shared and static libraries in a single compilation.
|
||||
# With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
|
||||
#
|
||||
# With libtool 1.5 this exception was removed, and libtool now
|
||||
# generates 2 separate objects for the 2 libraries. These two
|
||||
# compilations output dependencies in $dir.libs/$base.o.d and
|
||||
# in $dir$base.o.d. We have to check for both files, because
|
||||
# one of the two compilations can be disabled. We should prefer
|
||||
# $dir$base.o.d over $dir.libs/$base.o.d because the latter is
|
||||
# automatically cleaned when .libs/ is deleted, while ignoring
|
||||
# the former would cause a distcleancheck panic.
|
||||
tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4
|
||||
tmpdepfile2=$dir$base.o.d # libtool 1.5
|
||||
tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5
|
||||
tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504
|
||||
"$@" -Wc,-MD
|
||||
else
|
||||
tmpdepfile1=$dir$base.o.d
|
||||
tmpdepfile2=$dir$base.d
|
||||
tmpdepfile3=$dir$base.d
|
||||
tmpdepfile4=$dir$base.d
|
||||
"$@" -MD
|
||||
fi
|
||||
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
|
||||
do
|
||||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
if test -f "$tmpdepfile"; then
|
||||
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
|
||||
# That's a tab and a space in the [].
|
||||
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
#nosideeffect)
|
||||
# This comment above is used by automake to tell side-effect
|
||||
# dependency tracking mechanisms from slower ones.
|
||||
|
||||
dashmstdout)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout, regardless of -o.
|
||||
"$@" || exit $?
|
||||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test $1 != '--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
|
||||
# Remove `-o $object'.
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-o)
|
||||
shift
|
||||
;;
|
||||
$object)
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
test -z "$dashmflag" && dashmflag=-M
|
||||
# Require at least two characters before searching for `:'
|
||||
# in the target name. This is to cope with DOS-style filenames:
|
||||
# a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
|
||||
"$@" $dashmflag |
|
||||
sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
cat < "$tmpdepfile" > "$depfile"
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" | \
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
dashXmstdout)
|
||||
# This case only exists to satisfy depend.m4. It is never actually
|
||||
# run, as this mode is specially recognized in the preamble.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
makedepend)
|
||||
"$@" || exit $?
|
||||
# Remove any Libtool call
|
||||
if test "$libtool" = yes; then
|
||||
while test $1 != '--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
# X makedepend
|
||||
shift
|
||||
cleared=no
|
||||
for arg in "$@"; do
|
||||
case $cleared in
|
||||
no)
|
||||
set ""; shift
|
||||
cleared=yes ;;
|
||||
esac
|
||||
case "$arg" in
|
||||
-D*|-I*)
|
||||
set fnord "$@" "$arg"; shift ;;
|
||||
# Strip any option that makedepend may not understand. Remove
|
||||
# the object too, otherwise makedepend will parse it as a source file.
|
||||
-*|$object)
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"; shift ;;
|
||||
esac
|
||||
done
|
||||
obj_suffix="`echo $object | sed 's/^.*\././'`"
|
||||
touch "$tmpdepfile"
|
||||
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
|
||||
rm -f "$depfile"
|
||||
cat < "$tmpdepfile" > "$depfile"
|
||||
sed '1,2d' "$tmpdepfile" | tr ' ' '
|
||||
' | \
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile" "$tmpdepfile".bak
|
||||
;;
|
||||
|
||||
cpp)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout.
|
||||
"$@" || exit $?
|
||||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test $1 != '--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
|
||||
# Remove `-o $object'.
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-o)
|
||||
shift
|
||||
;;
|
||||
$object)
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
"$@" -E |
|
||||
sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
|
||||
-e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
|
||||
sed '$ s: \\$::' > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
cat < "$tmpdepfile" >> "$depfile"
|
||||
sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
msvisualcpp)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout, regardless of -o,
|
||||
# because we must use -o when running libtool.
|
||||
"$@" || exit $?
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case "$arg" in
|
||||
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
|
||||
set fnord "$@"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
done
|
||||
"$@" -E |
|
||||
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
|
||||
echo " " >> "$depfile"
|
||||
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
none)
|
||||
exec "$@"
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Unknown depmode $depmode" 1>&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-end: "$"
|
||||
# End:
|
519
qse/autoconf/install-sh
Executable file
519
qse/autoconf/install-sh
Executable file
@ -0,0 +1,519 @@
|
||||
#!/bin/sh
|
||||
# install - install a program, script, or datafile
|
||||
|
||||
scriptversion=2006-12-25.00
|
||||
|
||||
# This originates from X11R5 (mit/util/scripts/install.sh), which was
|
||||
# later released in X11R6 (xc/config/util/install.sh) with the
|
||||
# following copyright and license.
|
||||
#
|
||||
# Copyright (C) 1994 X Consortium
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to
|
||||
# deal in the Software without restriction, including without limitation the
|
||||
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
# sell copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
|
||||
# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
#
|
||||
# Except as contained in this notice, the name of the X Consortium shall not
|
||||
# be used in advertising or otherwise to promote the sale, use or other deal-
|
||||
# ings in this Software without prior written authorization from the X Consor-
|
||||
# tium.
|
||||
#
|
||||
#
|
||||
# FSF changes to this file are in the public domain.
|
||||
#
|
||||
# Calling this script install-sh is preferred over install.sh, to prevent
|
||||
# `make' implicit rules from creating a file called install from it
|
||||
# when there is no Makefile.
|
||||
#
|
||||
# This script is compatible with the BSD install script, but was written
|
||||
# from scratch.
|
||||
|
||||
nl='
|
||||
'
|
||||
IFS=" "" $nl"
|
||||
|
||||
# set DOITPROG to echo to test this script
|
||||
|
||||
# Don't use :- since 4.3BSD and earlier shells don't like it.
|
||||
doit=${DOITPROG-}
|
||||
if test -z "$doit"; then
|
||||
doit_exec=exec
|
||||
else
|
||||
doit_exec=$doit
|
||||
fi
|
||||
|
||||
# Put in absolute file names if you don't have them in your path;
|
||||
# or use environment vars.
|
||||
|
||||
chgrpprog=${CHGRPPROG-chgrp}
|
||||
chmodprog=${CHMODPROG-chmod}
|
||||
chownprog=${CHOWNPROG-chown}
|
||||
cmpprog=${CMPPROG-cmp}
|
||||
cpprog=${CPPROG-cp}
|
||||
mkdirprog=${MKDIRPROG-mkdir}
|
||||
mvprog=${MVPROG-mv}
|
||||
rmprog=${RMPROG-rm}
|
||||
stripprog=${STRIPPROG-strip}
|
||||
|
||||
posix_glob='?'
|
||||
initialize_posix_glob='
|
||||
test "$posix_glob" != "?" || {
|
||||
if (set -f) 2>/dev/null; then
|
||||
posix_glob=
|
||||
else
|
||||
posix_glob=:
|
||||
fi
|
||||
}
|
||||
'
|
||||
|
||||
posix_mkdir=
|
||||
|
||||
# Desired mode of installed file.
|
||||
mode=0755
|
||||
|
||||
chgrpcmd=
|
||||
chmodcmd=$chmodprog
|
||||
chowncmd=
|
||||
mvcmd=$mvprog
|
||||
rmcmd="$rmprog -f"
|
||||
stripcmd=
|
||||
|
||||
src=
|
||||
dst=
|
||||
dir_arg=
|
||||
dst_arg=
|
||||
|
||||
copy_on_change=false
|
||||
no_target_directory=
|
||||
|
||||
usage="\
|
||||
Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
|
||||
or: $0 [OPTION]... SRCFILES... DIRECTORY
|
||||
or: $0 [OPTION]... -t DIRECTORY SRCFILES...
|
||||
or: $0 [OPTION]... -d DIRECTORIES...
|
||||
|
||||
In the 1st form, copy SRCFILE to DSTFILE.
|
||||
In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
|
||||
In the 4th, create DIRECTORIES.
|
||||
|
||||
Options:
|
||||
--help display this help and exit.
|
||||
--version display version info and exit.
|
||||
|
||||
-c (ignored)
|
||||
-C install only if different (preserve the last data modification time)
|
||||
-d create directories instead of installing files.
|
||||
-g GROUP $chgrpprog installed files to GROUP.
|
||||
-m MODE $chmodprog installed files to MODE.
|
||||
-o USER $chownprog installed files to USER.
|
||||
-s $stripprog installed files.
|
||||
-t DIRECTORY install into DIRECTORY.
|
||||
-T report an error if DSTFILE is a directory.
|
||||
|
||||
Environment variables override the default commands:
|
||||
CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
|
||||
RMPROG STRIPPROG
|
||||
"
|
||||
|
||||
while test $# -ne 0; do
|
||||
case $1 in
|
||||
-c) ;;
|
||||
|
||||
-C) copy_on_change=true;;
|
||||
|
||||
-d) dir_arg=true;;
|
||||
|
||||
-g) chgrpcmd="$chgrpprog $2"
|
||||
shift;;
|
||||
|
||||
--help) echo "$usage"; exit $?;;
|
||||
|
||||
-m) mode=$2
|
||||
case $mode in
|
||||
*' '* | *' '* | *'
|
||||
'* | *'*'* | *'?'* | *'['*)
|
||||
echo "$0: invalid mode: $mode" >&2
|
||||
exit 1;;
|
||||
esac
|
||||
shift;;
|
||||
|
||||
-o) chowncmd="$chownprog $2"
|
||||
shift;;
|
||||
|
||||
-s) stripcmd=$stripprog;;
|
||||
|
||||
-t) dst_arg=$2
|
||||
shift;;
|
||||
|
||||
-T) no_target_directory=true;;
|
||||
|
||||
--version) echo "$0 $scriptversion"; exit $?;;
|
||||
|
||||
--) shift
|
||||
break;;
|
||||
|
||||
-*) echo "$0: invalid option: $1" >&2
|
||||
exit 1;;
|
||||
|
||||
*) break;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
|
||||
# When -d is used, all remaining arguments are directories to create.
|
||||
# When -t is used, the destination is already specified.
|
||||
# Otherwise, the last argument is the destination. Remove it from $@.
|
||||
for arg
|
||||
do
|
||||
if test -n "$dst_arg"; then
|
||||
# $@ is not empty: it contains at least $arg.
|
||||
set fnord "$@" "$dst_arg"
|
||||
shift # fnord
|
||||
fi
|
||||
shift # arg
|
||||
dst_arg=$arg
|
||||
done
|
||||
fi
|
||||
|
||||
if test $# -eq 0; then
|
||||
if test -z "$dir_arg"; then
|
||||
echo "$0: no input file specified." >&2
|
||||
exit 1
|
||||
fi
|
||||
# It's OK to call `install-sh -d' without argument.
|
||||
# This can happen when creating conditional directories.
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if test -z "$dir_arg"; then
|
||||
trap '(exit $?); exit' 1 2 13 15
|
||||
|
||||
# Set umask so as not to create temps with too-generous modes.
|
||||
# However, 'strip' requires both read and write access to temps.
|
||||
case $mode in
|
||||
# Optimize common cases.
|
||||
*644) cp_umask=133;;
|
||||
*755) cp_umask=22;;
|
||||
|
||||
*[0-7])
|
||||
if test -z "$stripcmd"; then
|
||||
u_plus_rw=
|
||||
else
|
||||
u_plus_rw='% 200'
|
||||
fi
|
||||
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
|
||||
*)
|
||||
if test -z "$stripcmd"; then
|
||||
u_plus_rw=
|
||||
else
|
||||
u_plus_rw=,u+rw
|
||||
fi
|
||||
cp_umask=$mode$u_plus_rw;;
|
||||
esac
|
||||
fi
|
||||
|
||||
for src
|
||||
do
|
||||
# Protect names starting with `-'.
|
||||
case $src in
|
||||
-*) src=./$src;;
|
||||
esac
|
||||
|
||||
if test -n "$dir_arg"; then
|
||||
dst=$src
|
||||
dstdir=$dst
|
||||
test -d "$dstdir"
|
||||
dstdir_status=$?
|
||||
else
|
||||
|
||||
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
|
||||
# might cause directories to be created, which would be especially bad
|
||||
# if $src (and thus $dsttmp) contains '*'.
|
||||
if test ! -f "$src" && test ! -d "$src"; then
|
||||
echo "$0: $src does not exist." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if test -z "$dst_arg"; then
|
||||
echo "$0: no destination specified." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
dst=$dst_arg
|
||||
# Protect names starting with `-'.
|
||||
case $dst in
|
||||
-*) dst=./$dst;;
|
||||
esac
|
||||
|
||||
# If destination is a directory, append the input filename; won't work
|
||||
# if double slashes aren't ignored.
|
||||
if test -d "$dst"; then
|
||||
if test -n "$no_target_directory"; then
|
||||
echo "$0: $dst_arg: Is a directory" >&2
|
||||
exit 1
|
||||
fi
|
||||
dstdir=$dst
|
||||
dst=$dstdir/`basename "$src"`
|
||||
dstdir_status=0
|
||||
else
|
||||
# Prefer dirname, but fall back on a substitute if dirname fails.
|
||||
dstdir=`
|
||||
(dirname "$dst") 2>/dev/null ||
|
||||
expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
|
||||
X"$dst" : 'X\(//\)[^/]' \| \
|
||||
X"$dst" : 'X\(//\)$' \| \
|
||||
X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
|
||||
echo X"$dst" |
|
||||
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\(\/\/\)[^/].*/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\(\/\/\)$/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\(\/\).*/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
s/.*/./; q'
|
||||
`
|
||||
|
||||
test -d "$dstdir"
|
||||
dstdir_status=$?
|
||||
fi
|
||||
fi
|
||||
|
||||
obsolete_mkdir_used=false
|
||||
|
||||
if test $dstdir_status != 0; then
|
||||
case $posix_mkdir in
|
||||
'')
|
||||
# Create intermediate dirs using mode 755 as modified by the umask.
|
||||
# This is like FreeBSD 'install' as of 1997-10-28.
|
||||
umask=`umask`
|
||||
case $stripcmd.$umask in
|
||||
# Optimize common cases.
|
||||
*[2367][2367]) mkdir_umask=$umask;;
|
||||
.*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
|
||||
|
||||
*[0-7])
|
||||
mkdir_umask=`expr $umask + 22 \
|
||||
- $umask % 100 % 40 + $umask % 20 \
|
||||
- $umask % 10 % 4 + $umask % 2
|
||||
`;;
|
||||
*) mkdir_umask=$umask,go-w;;
|
||||
esac
|
||||
|
||||
# With -d, create the new directory with the user-specified mode.
|
||||
# Otherwise, rely on $mkdir_umask.
|
||||
if test -n "$dir_arg"; then
|
||||
mkdir_mode=-m$mode
|
||||
else
|
||||
mkdir_mode=
|
||||
fi
|
||||
|
||||
posix_mkdir=false
|
||||
case $umask in
|
||||
*[123567][0-7][0-7])
|
||||
# POSIX mkdir -p sets u+wx bits regardless of umask, which
|
||||
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
|
||||
;;
|
||||
*)
|
||||
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
|
||||
trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
|
||||
|
||||
if (umask $mkdir_umask &&
|
||||
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
|
||||
then
|
||||
if test -z "$dir_arg" || {
|
||||
# Check for POSIX incompatibilities with -m.
|
||||
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
|
||||
# other-writeable bit of parent directory when it shouldn't.
|
||||
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
|
||||
ls_ld_tmpdir=`ls -ld "$tmpdir"`
|
||||
case $ls_ld_tmpdir in
|
||||
d????-?r-*) different_mode=700;;
|
||||
d????-?--*) different_mode=755;;
|
||||
*) false;;
|
||||
esac &&
|
||||
$mkdirprog -m$different_mode -p -- "$tmpdir" && {
|
||||
ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
|
||||
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
|
||||
}
|
||||
}
|
||||
then posix_mkdir=:
|
||||
fi
|
||||
rmdir "$tmpdir/d" "$tmpdir"
|
||||
else
|
||||
# Remove any dirs left behind by ancient mkdir implementations.
|
||||
rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
|
||||
fi
|
||||
trap '' 0;;
|
||||
esac;;
|
||||
esac
|
||||
|
||||
if
|
||||
$posix_mkdir && (
|
||||
umask $mkdir_umask &&
|
||||
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
|
||||
)
|
||||
then :
|
||||
else
|
||||
|
||||
# The umask is ridiculous, or mkdir does not conform to POSIX,
|
||||
# or it failed possibly due to a race condition. Create the
|
||||
# directory the slow way, step by step, checking for races as we go.
|
||||
|
||||
case $dstdir in
|
||||
/*) prefix='/';;
|
||||
-*) prefix='./';;
|
||||
*) prefix='';;
|
||||
esac
|
||||
|
||||
eval "$initialize_posix_glob"
|
||||
|
||||
oIFS=$IFS
|
||||
IFS=/
|
||||
$posix_glob set -f
|
||||
set fnord $dstdir
|
||||
shift
|
||||
$posix_glob set +f
|
||||
IFS=$oIFS
|
||||
|
||||
prefixes=
|
||||
|
||||
for d
|
||||
do
|
||||
test -z "$d" && continue
|
||||
|
||||
prefix=$prefix$d
|
||||
if test -d "$prefix"; then
|
||||
prefixes=
|
||||
else
|
||||
if $posix_mkdir; then
|
||||
(umask=$mkdir_umask &&
|
||||
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
|
||||
# Don't fail if two instances are running concurrently.
|
||||
test -d "$prefix" || exit 1
|
||||
else
|
||||
case $prefix in
|
||||
*\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
|
||||
*) qprefix=$prefix;;
|
||||
esac
|
||||
prefixes="$prefixes '$qprefix'"
|
||||
fi
|
||||
fi
|
||||
prefix=$prefix/
|
||||
done
|
||||
|
||||
if test -n "$prefixes"; then
|
||||
# Don't fail if two instances are running concurrently.
|
||||
(umask $mkdir_umask &&
|
||||
eval "\$doit_exec \$mkdirprog $prefixes") ||
|
||||
test -d "$dstdir" || exit 1
|
||||
obsolete_mkdir_used=true
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test -n "$dir_arg"; then
|
||||
{ test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
|
||||
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
|
||||
{ test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
|
||||
test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
|
||||
else
|
||||
|
||||
# Make a couple of temp file names in the proper directory.
|
||||
dsttmp=$dstdir/_inst.$$_
|
||||
rmtmp=$dstdir/_rm.$$_
|
||||
|
||||
# Trap to clean up those temp files at exit.
|
||||
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
|
||||
|
||||
# Copy the file name to the temp name.
|
||||
(umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
|
||||
|
||||
# and set any options; do chmod last to preserve setuid bits.
|
||||
#
|
||||
# If any of these fail, we abort the whole thing. If we want to
|
||||
# ignore errors from any of these, just make sure not to ignore
|
||||
# errors from the above "$doit $cpprog $src $dsttmp" command.
|
||||
#
|
||||
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
|
||||
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
|
||||
{ test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
|
||||
{ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
|
||||
|
||||
# If -C, don't bother to copy if it wouldn't change the file.
|
||||
if $copy_on_change &&
|
||||
old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
|
||||
new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
|
||||
|
||||
eval "$initialize_posix_glob" &&
|
||||
$posix_glob set -f &&
|
||||
set X $old && old=:$2:$4:$5:$6 &&
|
||||
set X $new && new=:$2:$4:$5:$6 &&
|
||||
$posix_glob set +f &&
|
||||
|
||||
test "$old" = "$new" &&
|
||||
$cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
|
||||
then
|
||||
rm -f "$dsttmp"
|
||||
else
|
||||
# Rename the file to the real destination.
|
||||
$doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
|
||||
|
||||
# The rename failed, perhaps because mv can't rename something else
|
||||
# to itself, or perhaps because mv is so ancient that it does not
|
||||
# support -f.
|
||||
{
|
||||
# Now remove or move aside any old file at destination location.
|
||||
# We try this two ways since rm can't unlink itself on some
|
||||
# systems and the destination file might be busy for other
|
||||
# reasons. In this case, the final cleanup might fail but the new
|
||||
# file should still install successfully.
|
||||
{
|
||||
test ! -f "$dst" ||
|
||||
$doit $rmcmd -f "$dst" 2>/dev/null ||
|
||||
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
|
||||
{ $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
|
||||
} ||
|
||||
{ echo "$0: cannot unlink or rename $dst" >&2
|
||||
(exit 1); exit 1
|
||||
}
|
||||
} &&
|
||||
|
||||
# Now rename the file to the real destination.
|
||||
$doit $mvcmd "$dsttmp" "$dst"
|
||||
}
|
||||
fi || exit 1
|
||||
|
||||
trap '' 0
|
||||
fi
|
||||
done
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-end: "$"
|
||||
# End:
|
6964
qse/autoconf/ltmain.sh
Normal file
6964
qse/autoconf/ltmain.sh
Normal file
File diff suppressed because it is too large
Load Diff
367
qse/autoconf/missing
Executable file
367
qse/autoconf/missing
Executable file
@ -0,0 +1,367 @@
|
||||
#! /bin/sh
|
||||
# Common stub for a few missing GNU programs while installing.
|
||||
|
||||
scriptversion=2006-05-10.23
|
||||
|
||||
# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006
|
||||
# Free Software Foundation, Inc.
|
||||
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
|
||||
# This program 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 General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
# 02110-1301, USA.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
if test $# -eq 0; then
|
||||
echo 1>&2 "Try \`$0 --help' for more information"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
run=:
|
||||
sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
|
||||
sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
|
||||
|
||||
# In the cases where this matters, `missing' is being run in the
|
||||
# srcdir already.
|
||||
if test -f configure.ac; then
|
||||
configure_ac=configure.ac
|
||||
else
|
||||
configure_ac=configure.in
|
||||
fi
|
||||
|
||||
msg="missing on your system"
|
||||
|
||||
case $1 in
|
||||
--run)
|
||||
# Try to run requested program, and just exit if it succeeds.
|
||||
run=
|
||||
shift
|
||||
"$@" && exit 0
|
||||
# Exit code 63 means version mismatch. This often happens
|
||||
# when the user try to use an ancient version of a tool on
|
||||
# a file that requires a minimum version. In this case we
|
||||
# we should proceed has if the program had been absent, or
|
||||
# if --run hadn't been passed.
|
||||
if test $? = 63; then
|
||||
run=:
|
||||
msg="probably too old"
|
||||
fi
|
||||
;;
|
||||
|
||||
-h|--h|--he|--hel|--help)
|
||||
echo "\
|
||||
$0 [OPTION]... PROGRAM [ARGUMENT]...
|
||||
|
||||
Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
|
||||
error status if there is no known handling for PROGRAM.
|
||||
|
||||
Options:
|
||||
-h, --help display this help and exit
|
||||
-v, --version output version information and exit
|
||||
--run try to run the given command, and emulate it if it fails
|
||||
|
||||
Supported PROGRAM values:
|
||||
aclocal touch file \`aclocal.m4'
|
||||
autoconf touch file \`configure'
|
||||
autoheader touch file \`config.h.in'
|
||||
autom4te touch the output file, or create a stub one
|
||||
automake touch all \`Makefile.in' files
|
||||
bison create \`y.tab.[ch]', if possible, from existing .[ch]
|
||||
flex create \`lex.yy.c', if possible, from existing .c
|
||||
help2man touch the output file
|
||||
lex create \`lex.yy.c', if possible, from existing .c
|
||||
makeinfo touch the output file
|
||||
tar try tar, gnutar, gtar, then tar without non-portable flags
|
||||
yacc create \`y.tab.[ch]', if possible, from existing .[ch]
|
||||
|
||||
Send bug reports to <bug-automake@gnu.org>."
|
||||
exit $?
|
||||
;;
|
||||
|
||||
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
|
||||
echo "missing $scriptversion (GNU Automake)"
|
||||
exit $?
|
||||
;;
|
||||
|
||||
-*)
|
||||
echo 1>&2 "$0: Unknown \`$1' option"
|
||||
echo 1>&2 "Try \`$0 --help' for more information"
|
||||
exit 1
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
# Now exit if we have it, but it failed. Also exit now if we
|
||||
# don't have it and --version was passed (most likely to detect
|
||||
# the program).
|
||||
case $1 in
|
||||
lex|yacc)
|
||||
# Not GNU programs, they don't have --version.
|
||||
;;
|
||||
|
||||
tar)
|
||||
if test -n "$run"; then
|
||||
echo 1>&2 "ERROR: \`tar' requires --run"
|
||||
exit 1
|
||||
elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
|
||||
*)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
|
||||
# Could not run --version or --help. This is probably someone
|
||||
# running `$TOOL --version' or `$TOOL --help' to check whether
|
||||
# $TOOL exists and not knowing $TOOL uses missing.
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
# If it does not exist, or fails to run (possibly an outdated version),
|
||||
# try to emulate it.
|
||||
case $1 in
|
||||
aclocal*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified \`acinclude.m4' or \`${configure_ac}'. You might want
|
||||
to install the \`Automake' and \`Perl' packages. Grab them from
|
||||
any GNU archive site."
|
||||
touch aclocal.m4
|
||||
;;
|
||||
|
||||
autoconf)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified \`${configure_ac}'. You might want to install the
|
||||
\`Autoconf' and \`GNU m4' packages. Grab them from any GNU
|
||||
archive site."
|
||||
touch configure
|
||||
;;
|
||||
|
||||
autoheader)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified \`acconfig.h' or \`${configure_ac}'. You might want
|
||||
to install the \`Autoconf' and \`GNU m4' packages. Grab them
|
||||
from any GNU archive site."
|
||||
files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
|
||||
test -z "$files" && files="config.h"
|
||||
touch_files=
|
||||
for f in $files; do
|
||||
case $f in
|
||||
*:*) touch_files="$touch_files "`echo "$f" |
|
||||
sed -e 's/^[^:]*://' -e 's/:.*//'`;;
|
||||
*) touch_files="$touch_files $f.in";;
|
||||
esac
|
||||
done
|
||||
touch $touch_files
|
||||
;;
|
||||
|
||||
automake*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
|
||||
You might want to install the \`Automake' and \`Perl' packages.
|
||||
Grab them from any GNU archive site."
|
||||
find . -type f -name Makefile.am -print |
|
||||
sed 's/\.am$/.in/' |
|
||||
while read f; do touch "$f"; done
|
||||
;;
|
||||
|
||||
autom4te)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is needed, but is $msg.
|
||||
You might have modified some files without having the
|
||||
proper tools for further handling them.
|
||||
You can get \`$1' as part of \`Autoconf' from any GNU
|
||||
archive site."
|
||||
|
||||
file=`echo "$*" | sed -n "$sed_output"`
|
||||
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
|
||||
if test -f "$file"; then
|
||||
touch $file
|
||||
else
|
||||
test -z "$file" || exec >$file
|
||||
echo "#! /bin/sh"
|
||||
echo "# Created by GNU Automake missing as a replacement of"
|
||||
echo "# $ $@"
|
||||
echo "exit 0"
|
||||
chmod +x $file
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
|
||||
bison|yacc)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' $msg. You should only need it if
|
||||
you modified a \`.y' file. You may need the \`Bison' package
|
||||
in order for those modifications to take effect. You can get
|
||||
\`Bison' from any GNU archive site."
|
||||
rm -f y.tab.c y.tab.h
|
||||
if test $# -ne 1; then
|
||||
eval LASTARG="\${$#}"
|
||||
case $LASTARG in
|
||||
*.y)
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
|
||||
if test -f "$SRCFILE"; then
|
||||
cp "$SRCFILE" y.tab.c
|
||||
fi
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
|
||||
if test -f "$SRCFILE"; then
|
||||
cp "$SRCFILE" y.tab.h
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if test ! -f y.tab.h; then
|
||||
echo >y.tab.h
|
||||
fi
|
||||
if test ! -f y.tab.c; then
|
||||
echo 'main() { return 0; }' >y.tab.c
|
||||
fi
|
||||
;;
|
||||
|
||||
lex|flex)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified a \`.l' file. You may need the \`Flex' package
|
||||
in order for those modifications to take effect. You can get
|
||||
\`Flex' from any GNU archive site."
|
||||
rm -f lex.yy.c
|
||||
if test $# -ne 1; then
|
||||
eval LASTARG="\${$#}"
|
||||
case $LASTARG in
|
||||
*.l)
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
|
||||
if test -f "$SRCFILE"; then
|
||||
cp "$SRCFILE" lex.yy.c
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if test ! -f lex.yy.c; then
|
||||
echo 'main() { return 0; }' >lex.yy.c
|
||||
fi
|
||||
;;
|
||||
|
||||
help2man)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified a dependency of a manual page. You may need the
|
||||
\`Help2man' package in order for those modifications to take
|
||||
effect. You can get \`Help2man' from any GNU archive site."
|
||||
|
||||
file=`echo "$*" | sed -n "$sed_output"`
|
||||
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
|
||||
if test -f "$file"; then
|
||||
touch $file
|
||||
else
|
||||
test -z "$file" || exec >$file
|
||||
echo ".ab help2man is required to generate this page"
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
|
||||
makeinfo)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified a \`.texi' or \`.texinfo' file, or any other file
|
||||
indirectly affecting the aspect of the manual. The spurious
|
||||
call might also be the consequence of using a buggy \`make' (AIX,
|
||||
DU, IRIX). You might want to install the \`Texinfo' package or
|
||||
the \`GNU make' package. Grab either from any GNU archive site."
|
||||
# The file to touch is that specified with -o ...
|
||||
file=`echo "$*" | sed -n "$sed_output"`
|
||||
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
|
||||
if test -z "$file"; then
|
||||
# ... or it is the one specified with @setfilename ...
|
||||
infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
|
||||
file=`sed -n '
|
||||
/^@setfilename/{
|
||||
s/.* \([^ ]*\) *$/\1/
|
||||
p
|
||||
q
|
||||
}' $infile`
|
||||
# ... or it is derived from the source name (dir/f.texi becomes f.info)
|
||||
test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
|
||||
fi
|
||||
# If the file does not exist, the user really needs makeinfo;
|
||||
# let's fail without touching anything.
|
||||
test -f $file || exit 1
|
||||
touch $file
|
||||
;;
|
||||
|
||||
tar)
|
||||
shift
|
||||
|
||||
# We have already tried tar in the generic part.
|
||||
# Look for gnutar/gtar before invocation to avoid ugly error
|
||||
# messages.
|
||||
if (gnutar --version > /dev/null 2>&1); then
|
||||
gnutar "$@" && exit 0
|
||||
fi
|
||||
if (gtar --version > /dev/null 2>&1); then
|
||||
gtar "$@" && exit 0
|
||||
fi
|
||||
firstarg="$1"
|
||||
if shift; then
|
||||
case $firstarg in
|
||||
*o*)
|
||||
firstarg=`echo "$firstarg" | sed s/o//`
|
||||
tar "$firstarg" "$@" && exit 0
|
||||
;;
|
||||
esac
|
||||
case $firstarg in
|
||||
*h*)
|
||||
firstarg=`echo "$firstarg" | sed s/h//`
|
||||
tar "$firstarg" "$@" && exit 0
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: I can't seem to be able to run \`tar' with the given arguments.
|
||||
You may want to install GNU tar or Free paxutils, or check the
|
||||
command line arguments."
|
||||
exit 1
|
||||
;;
|
||||
|
||||
*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is needed, and is $msg.
|
||||
You might have modified some files without having the
|
||||
proper tools for further handling them. Check the \`README' file,
|
||||
it often tells you about the needed prerequisites for installing
|
||||
this package. You may also peek at any GNU archive site, in case
|
||||
some other package would contain this missing \`$1' program."
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-end: "$"
|
||||
# End:
|
75
qse/build.xml
Normal file
75
qse/build.xml
Normal file
@ -0,0 +1,75 @@
|
||||
<!-- $Id: build.xml,v 1.4 2007/11/04 04:06:37 bacon Exp $ -->
|
||||
|
||||
<project name="ase" default="release" basedir=".">
|
||||
|
||||
<description>
|
||||
ANT build script for ASE
|
||||
</description>
|
||||
|
||||
<!--
|
||||
<property name="destdir" location="${basedir}/release" />
|
||||
-->
|
||||
|
||||
<target name="release" depends="init-release,aseawk.jar,aseawk.test">
|
||||
</target>
|
||||
|
||||
<target name="debug" depends="init-debug,aseawk.jar,aseawk.test">
|
||||
</target>
|
||||
|
||||
<target name="init-release">
|
||||
<property name="destdir" location="${basedir}/release" />
|
||||
<property name="libdir" location="${destdir}/lib" />
|
||||
<property name="bindir" location="${destdir}/bin" />
|
||||
<mkdir dir="${libdir}" />
|
||||
<mkdir dir="${bindir}" />
|
||||
</target>
|
||||
|
||||
<target name="init-debug">
|
||||
<property name="destdir" location="${basedir}/debug" />
|
||||
<property name="libdir" location="${destdir}/lib" />
|
||||
<property name="bindir" location="${destdir}/bin" />
|
||||
<mkdir dir="${libdir}" />
|
||||
<mkdir dir="${bindir}" />
|
||||
</target>
|
||||
|
||||
<target name="aseawk.jar" description="compile the awk classes">
|
||||
<javac srcdir="awk" destdir="${libdir}" />
|
||||
|
||||
<jar jarfile="${libdir}/aseawk.jar"
|
||||
basedir="${libdir}"
|
||||
includes="ase/awk/*.class" />
|
||||
|
||||
<delete dir="${libdir}/ase" />
|
||||
</target>
|
||||
|
||||
<target name="aseawk.test" depends="aseawk.jar"
|
||||
description="compile the awk test classes">
|
||||
|
||||
<javac srcdir="test/awk"
|
||||
classpath="${libdir}/aseawk.jar"
|
||||
destdir="${bindir}" />
|
||||
|
||||
<unjar src="${libdir}/aseawk.jar" dest="${bindir}" />
|
||||
<jar jarfile="${bindir}/aseawk.jar"
|
||||
basedir="${bindir}"
|
||||
includes="**/*.class"
|
||||
manifest="test/awk/manifest" />
|
||||
<delete>
|
||||
<fileset dir="${bindir}" includes="*.class" />
|
||||
</delete>
|
||||
<delete dir="${bindir}/ase" verbose="true" />
|
||||
<delete dir="${bindir}/META-INF" verbose="true" />
|
||||
|
||||
<copy file="test/awk/AseAwkApplet.html" todir="${destdir}" />
|
||||
<copy file="test/awk/AseAwkApplet-ko.html" todir="${destdir}" />
|
||||
<copy file="test/awk/AseAwkApplet.js" todir="${destdir}" />
|
||||
</target>
|
||||
|
||||
<target name="clean" description="clean up">
|
||||
<delete dir="${basedir}/release"
|
||||
includes="**/*.class,**/*.jar" verbose="true"/>
|
||||
<delete dir="${basedir}/debug"
|
||||
includes="**/*.class,**/*.jar" verbose="true"/>
|
||||
</target>
|
||||
|
||||
</project>
|
122
qse/change.log
Normal file
122
qse/change.log
Normal file
@ -0,0 +1,122 @@
|
||||
[0.3.4]
|
||||
|
||||
* enhanced the AWK interpreter to be more compatible to AWK
|
||||
- no more semicolon needed to terminate a statement with ASE_AWK_NEWLINE on.
|
||||
* removed the ASE_AWK_STRCONCAT option.
|
||||
* added the ASE_AWK_BXOR option.
|
||||
|
||||
[0.3.3]
|
||||
|
||||
* enhanced the AWK interpreter to allow multiple BEGIN/END blocks.
|
||||
* enhanced the parser to handle ("abc" ++ k) as ("abc" . ++k) when
|
||||
ASE_AWK_IMPLICIT is on.
|
||||
|
||||
* fixed a memory leak bug in the following context.
|
||||
BEGIN {
|
||||
d = 90;
|
||||
x[30] = d;
|
||||
/* Reference count for d was not properly decremented
|
||||
* when a map slot is assigned with the same value as
|
||||
* the previous value. */
|
||||
x[30] = d;
|
||||
}
|
||||
|
||||
* fixed a control-flow bug in the following context.
|
||||
function error() { exit (1); }
|
||||
function getx()
|
||||
{
|
||||
if (x == 2) error();
|
||||
return x++;
|
||||
}
|
||||
function gety() { return y++; }
|
||||
BEGIN {
|
||||
x = 0;
|
||||
y = 0;
|
||||
print getx() + gety();
|
||||
print getx() + gety();
|
||||
/* this following line should not have been printed as
|
||||
* exit() is executed in getx(). */
|
||||
print getx() + gety();
|
||||
print getx() + gety();
|
||||
}
|
||||
|
||||
* redefined the variable scope
|
||||
* removed ASE_AWK_UNIQUEFN and ASE_AWK_SHADING by refining the scoping rule
|
||||
* fixed a bug in handling >> when ASE_AWK_SHIFT is off
|
||||
|
||||
* added ASE_AWK_EVARRED
|
||||
* added five operators - <<=, >>=, &=, ^=, |=
|
||||
|
||||
[0.3.2]
|
||||
|
||||
* fixed a build problem for x64 target in MSVC2005
|
||||
|
||||
[0.3.1]
|
||||
|
||||
* added to the awk interpreter the capibility to manipulate global variables
|
||||
- added ase_awk_addglobal, ase_awk_delglobal (awk/parse.c)
|
||||
- added Awk::addGlobal, Awk::deleteGlobal (awk/Awk.hpp, awk/Awk.cpp)
|
||||
- added Awk::Run::setGlobal, Awk::Run::getGlobal (awk/Awk.hpp, awk/Awk.cpp)
|
||||
- added Awk::AddGlobal, Awk::DeleteGlobal (net/Awk.hpp, net/Awk.cpp)
|
||||
- added Awk::Run::SetGlobal, Awk::Run::GetGlobal (net/Awk.hpp, net/Awk.cpp)
|
||||
- enhanced ase_awk_getglobalname
|
||||
* added three new options - ASE_AWK_RESET, ASE_AWK_MAPTOVAR, ASE_AWK_PABLOCK
|
||||
|
||||
* enhanced Awk::dispatchFunction to set a more accurate error code (awk/Awk.cpp)
|
||||
* enhanced the JNI binding to integrate most of the changes so far.
|
||||
|
||||
* fixed a bug
|
||||
- memory leak if a null statement or a block with no statements are
|
||||
present in an AWK program. (awk/parse.c)
|
||||
- memery leak if a return value is set by an intrinsic function
|
||||
but it ends up with an error. (awk/run.c - eval_call)
|
||||
|
||||
* changed the access modifier for the Awk::Source::Source from public
|
||||
to protected.
|
||||
* renamed ase_awk_addbfn & ase_awk_delbfn to ase_awk_addfunc & ase_awk_delfunc
|
||||
respectively.
|
||||
|
||||
* started the source code documentation of awk/Awk.hpp.
|
||||
* enhanded test programs.
|
||||
|
||||
[0.3.0]
|
||||
|
||||
* added ase_awk_setword to enable customization of keywords and
|
||||
intrinsic function names.
|
||||
* added ase_awk_seterrmsg to set the error message to be any string given
|
||||
* added setWord/unsetWord method to the awk c++ class (awk/Awk.cpp)
|
||||
* added setErrorString method to the awk c++ class (awk/Awk.cpp)
|
||||
* added setWord/unsetWord method to the awk java class (awk/Awk.java)
|
||||
* added the error code ASE_AWK_ELXDIG to indicate a wrong digit in
|
||||
octal number tokenization.
|
||||
* added setWord/unsetWord method to the awk com module (com/Awk.cpp)
|
||||
* added the .NET interface to the awk interpreter (net/Awk.cpp net/StdAwk.cpp)
|
||||
|
||||
* changed the wrong macro name WIN32 to _WIN32 in utl/stdio.h
|
||||
* changed test/awk/Awk.cpp to include an option(-w) to utilize
|
||||
the setWord method.
|
||||
* changed test/awk/AseAwk.java to include an option(-w) to utilize
|
||||
the setWord method.
|
||||
|
||||
* enhanced awk/map.c to support automatic rehashing
|
||||
|
||||
[0.2.0]
|
||||
|
||||
* fixed bug (nextofile shown as nextfile in source output)
|
||||
* fixed bug (nextofile not allowed in the BEGIN and END block)
|
||||
* fixed bug (ASE_MALLOC/ASE_FREE defined wrongly causing sample programs
|
||||
to crash in the debug mode when compiled with MSVC/C++.
|
||||
* fixed bug (the first character of the next record lost when RS are
|
||||
multiple characters)
|
||||
* fixed bug (the last field of the last record lost when RS are
|
||||
multiple characters)
|
||||
|
||||
* added awk c++ classes (awk/Awk.hpp awk/Awk.cpp awk/StdAwk.hpp awk/StdAwk.cpp)
|
||||
* added c++ sample program (test/awk/Awk.cpp)
|
||||
|
||||
* changed test/awk/AseAwk.java to be funtionally identical to test/awk/Awk.cpp
|
||||
* changed the way to invoke the main function (utl/main.h utl/main.c)
|
||||
|
||||
[0.1.0]
|
||||
|
||||
* initial release
|
914
qse/cmd/awk/Awk.cpp
Normal file
914
qse/cmd/awk/Awk.cpp
Normal file
@ -0,0 +1,914 @@
|
||||
/*
|
||||
* $Id: Awk.cpp 341 2008-08-20 10:58:19Z baconevi $
|
||||
*/
|
||||
|
||||
#include <ase/awk/StdAwk.hpp>
|
||||
#include <ase/cmn/str.h>
|
||||
#include <ase/utl/stdio.h>
|
||||
#include <ase/utl/main.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
|
||||
#if defined(_WIN32)
|
||||
#include <windows.h>
|
||||
#else
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#if defined(_WIN32) && defined(_MSC_VER) && defined(_DEBUG)
|
||||
#define _CRTDBG_MAP_ALLOC
|
||||
#include <crtdbg.h>
|
||||
#endif
|
||||
|
||||
#if defined(__linux) && defined(_DEBUG)
|
||||
#include <mcheck.h>
|
||||
#endif
|
||||
|
||||
static bool verbose = false;
|
||||
|
||||
class TestAwk: public ASE::StdAwk
|
||||
{
|
||||
public:
|
||||
TestAwk (): srcInName(ASE_NULL), srcOutName(ASE_NULL),
|
||||
numConInFiles(0), numConOutFiles(0)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
heap = ASE_NULL;
|
||||
#endif
|
||||
}
|
||||
|
||||
~TestAwk ()
|
||||
{
|
||||
close ();
|
||||
}
|
||||
|
||||
int open ()
|
||||
{
|
||||
#ifdef _WIN32
|
||||
ASE_ASSERT (heap == ASE_NULL);
|
||||
heap = ::HeapCreate (0, 1000000, 1000000);
|
||||
if (heap == ASE_NULL) return -1;
|
||||
#endif
|
||||
|
||||
#if defined(_MSC_VER) && (_MSC_VER<1400)
|
||||
int n = StdAwk::open ();
|
||||
#else
|
||||
int n = ASE::StdAwk::open ();
|
||||
#endif
|
||||
if (n == -1)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
HeapDestroy (heap);
|
||||
heap = ASE_NULL;
|
||||
#endif
|
||||
return -1;
|
||||
}
|
||||
|
||||
idLastSleep = addGlobal (ASE_T("LAST_SLEEP"));
|
||||
if (idLastSleep == -1) goto failure;
|
||||
|
||||
if (addFunction (ASE_T("sleep"), 1, 1,
|
||||
(FunctionHandler)&TestAwk::sleep) == -1) goto failure;
|
||||
|
||||
if (addFunction (ASE_T("sumintarray"), 1, 1,
|
||||
(FunctionHandler)&TestAwk::sumintarray) == -1) goto failure;
|
||||
|
||||
if (addFunction (ASE_T("arrayindices"), 1, 1,
|
||||
(FunctionHandler)&TestAwk::arrayindices) == -1) goto failure;
|
||||
return 0;
|
||||
|
||||
failure:
|
||||
#if defined(_MSC_VER) && (_MSC_VER<1400)
|
||||
StdAwk::close ();
|
||||
#else
|
||||
ASE::StdAwk::close ();
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
HeapDestroy (heap);
|
||||
heap = ASE_NULL;
|
||||
#endif
|
||||
return -1;
|
||||
}
|
||||
|
||||
void close ()
|
||||
{
|
||||
#if defined(_MSC_VER) && (_MSC_VER<1400)
|
||||
StdAwk::close ();
|
||||
#else
|
||||
ASE::StdAwk::close ();
|
||||
#endif
|
||||
|
||||
numConInFiles = 0;
|
||||
numConOutFiles = 0;
|
||||
|
||||
#ifdef _WIN32
|
||||
if (heap != ASE_NULL)
|
||||
{
|
||||
HeapDestroy (heap);
|
||||
heap = ASE_NULL;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
int sleep (Run& run, Return& ret, const Argument* args, size_t nargs,
|
||||
const char_t* name, size_t len)
|
||||
{
|
||||
if (args[0].isIndexed())
|
||||
{
|
||||
run.setError (ERR_INVAL);
|
||||
return -1;
|
||||
}
|
||||
|
||||
long_t x = args[0].toInt();
|
||||
|
||||
/*Argument arg;
|
||||
if (run.getGlobal(idLastSleep, arg) == 0)
|
||||
ase_printf (ASE_T("GOOD: [%d]\n"), (int)arg.toInt());
|
||||
else { ase_printf (ASE_T("BAD:\n")); }
|
||||
*/
|
||||
|
||||
if (run.setGlobal (idLastSleep, x) == -1) return -1;
|
||||
|
||||
#ifdef _WIN32
|
||||
::Sleep ((DWORD)(x * 1000));
|
||||
return ret.set ((long_t)0);
|
||||
#else
|
||||
return ret.set ((long_t)::sleep (x));
|
||||
#endif
|
||||
}
|
||||
|
||||
int sumintarray (Run& run, Return& ret, const Argument* args, size_t nargs,
|
||||
const char_t* name, size_t len)
|
||||
{
|
||||
long_t x = 0;
|
||||
|
||||
if (args[0].isIndexed())
|
||||
{
|
||||
Argument idx(run), val(run);
|
||||
|
||||
int n = args[0].getFirstIndex (idx);
|
||||
while (n > 0)
|
||||
{
|
||||
size_t len;
|
||||
const char_t* ptr = idx.toStr(&len);
|
||||
|
||||
if (args[0].getIndexed(ptr, len, val) == -1) return -1;
|
||||
x += val.toInt ();
|
||||
|
||||
n = args[0].getNextIndex (idx);
|
||||
}
|
||||
if (n != 0) return -1;
|
||||
}
|
||||
else x += args[0].toInt();
|
||||
|
||||
return ret.set (x);
|
||||
}
|
||||
|
||||
int arrayindices (Run& run, Return& ret, const Argument* args, size_t nargs,
|
||||
const char_t* name, size_t len)
|
||||
{
|
||||
if (!args[0].isIndexed()) return 0;
|
||||
|
||||
Argument idx (run);
|
||||
long_t i;
|
||||
|
||||
int n = args[0].getFirstIndex (idx);
|
||||
for (i = 0; n > 0; i++)
|
||||
{
|
||||
size_t len;
|
||||
const char_t* ptr = idx.toStr(&len);
|
||||
n = args[0].getNextIndex (idx);
|
||||
if (ret.setIndexed (i, ptr, len) == -1) return -1;
|
||||
}
|
||||
if (n != 0) return -1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int addConsoleInput (const char_t* file)
|
||||
{
|
||||
if (numConInFiles < ASE_COUNTOF(conInFile))
|
||||
{
|
||||
conInFile[numConInFiles++] = file;
|
||||
return 0;
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
int addConsoleOutput (const char_t* file)
|
||||
{
|
||||
if (numConOutFiles < ASE_COUNTOF(conOutFile))
|
||||
{
|
||||
conOutFile[numConOutFiles++] = file;
|
||||
return 0;
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
int parse (const char_t* in, const char_t* out)
|
||||
{
|
||||
srcInName = in;
|
||||
srcOutName = out;
|
||||
#if defined(_MSC_VER) && (_MSC_VER<1400)
|
||||
return StdAwk::parse ();
|
||||
#else
|
||||
return ASE::StdAwk::parse ();
|
||||
#endif
|
||||
}
|
||||
|
||||
protected:
|
||||
|
||||
void onRunStart (Run& run)
|
||||
{
|
||||
if (verbose) ase_printf (ASE_T("*** awk run started ***\n"));
|
||||
}
|
||||
|
||||
void onRunEnd (Run& run)
|
||||
{
|
||||
ErrorCode err = run.getErrorCode();
|
||||
|
||||
if (err != ERR_NOERR)
|
||||
{
|
||||
ase_fprintf (stderr, ASE_T("cannot run: LINE[%d] %s\n"),
|
||||
run.getErrorLine(), run.getErrorMessage());
|
||||
}
|
||||
|
||||
if (verbose) ase_printf (ASE_T("*** awk run ended ***\n"));
|
||||
}
|
||||
|
||||
void onRunReturn (Run& run, const Argument& ret)
|
||||
{
|
||||
if (verbose)
|
||||
{
|
||||
size_t len;
|
||||
const char_t* ptr = ret.toStr (&len);
|
||||
ase_printf (ASE_T("*** return [%.*s] ***\n"), (int)len, ptr);
|
||||
}
|
||||
}
|
||||
|
||||
int openSource (Source& io)
|
||||
{
|
||||
Source::Mode mode = io.getMode();
|
||||
FILE* fp = ASE_NULL;
|
||||
|
||||
if (mode == Source::READ)
|
||||
{
|
||||
if (srcInName == ASE_NULL)
|
||||
{
|
||||
io.setHandle (stdin);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (srcInName[0] == ASE_T('\0')) fp = stdin;
|
||||
else fp = ase_fopen (srcInName, ASE_T("r"));
|
||||
}
|
||||
else if (mode == Source::WRITE)
|
||||
{
|
||||
if (srcOutName == ASE_NULL)
|
||||
{
|
||||
io.setHandle (stdout);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (srcOutName[0] == ASE_T('\0')) fp = stdout;
|
||||
else fp = ase_fopen (srcOutName, ASE_T("w"));
|
||||
}
|
||||
|
||||
if (fp == ASE_NULL) return -1;
|
||||
io.setHandle (fp);
|
||||
return 1;
|
||||
}
|
||||
|
||||
int closeSource (Source& io)
|
||||
{
|
||||
Source::Mode mode = io.getMode();
|
||||
FILE* fp = (FILE*)io.getHandle();
|
||||
if (fp == stdout || fp == stderr) fflush (fp);
|
||||
if (fp != stdin && fp != stdout && fp != stderr) fclose (fp);
|
||||
io.setHandle (ASE_NULL);
|
||||
return 0;
|
||||
}
|
||||
|
||||
ssize_t readSource (Source& io, char_t* buf, size_t len)
|
||||
{
|
||||
FILE* fp = (FILE*)io.getHandle();
|
||||
ssize_t n = 0;
|
||||
|
||||
while (n < (ssize_t)len)
|
||||
{
|
||||
ase_cint_t c = ase_fgetc (fp);
|
||||
if (c == ASE_CHAR_EOF)
|
||||
{
|
||||
if (ase_ferror(fp)) n = -1;
|
||||
break;
|
||||
}
|
||||
|
||||
buf[n++] = c;
|
||||
if (c == ASE_T('\n')) break;
|
||||
}
|
||||
|
||||
return n;
|
||||
}
|
||||
|
||||
ssize_t writeSource (Source& io, char_t* buf, size_t len)
|
||||
{
|
||||
FILE* fp = (FILE*)io.getHandle();
|
||||
size_t left = len;
|
||||
|
||||
while (left > 0)
|
||||
{
|
||||
if (*buf == ASE_T('\0'))
|
||||
{
|
||||
if (ase_fputc (*buf, fp) == ASE_CHAR_EOF) return -1;
|
||||
left -= 1; buf += 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
int chunk = (left > ASE_TYPE_MAX(int))? ASE_TYPE_MAX(int): (int)left;
|
||||
int n = ase_fprintf (fp, ASE_T("%.*s"), chunk, buf);
|
||||
if (n < 0 || n > chunk) return -1;
|
||||
left -= n; buf += n;
|
||||
}
|
||||
}
|
||||
|
||||
return len;
|
||||
}
|
||||
|
||||
// console io handlers
|
||||
int openConsole (Console& io)
|
||||
{
|
||||
#if defined(_MSC_VER) && (_MSC_VER<1400)
|
||||
StdAwk::Console::Mode mode = io.getMode();
|
||||
#else
|
||||
ASE::StdAwk::Console::Mode mode = io.getMode();
|
||||
#endif
|
||||
FILE* fp = ASE_NULL;
|
||||
const char_t* fn = ASE_NULL;
|
||||
|
||||
switch (mode)
|
||||
{
|
||||
#if defined(_MSC_VER) && (_MSC_VER<1400)
|
||||
case StdAwk::Console::READ:
|
||||
#else
|
||||
case ASE::StdAwk::Console::READ:
|
||||
#endif
|
||||
if (numConInFiles == 0) fp = stdin;
|
||||
else
|
||||
{
|
||||
fn = conInFile[0];
|
||||
fp = ase_fopen (fn, ASE_T("r"));
|
||||
}
|
||||
break;
|
||||
|
||||
#if defined(_MSC_VER) && (_MSC_VER<1400)
|
||||
case StdAwk::Console::WRITE:
|
||||
#else
|
||||
case ASE::StdAwk::Console::WRITE:
|
||||
#endif
|
||||
if (numConOutFiles == 0) fp = stdout;
|
||||
else
|
||||
{
|
||||
fn = conOutFile[0];
|
||||
fp = ase_fopen (fn, ASE_T("w"));
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if (fp == NULL) return -1;
|
||||
|
||||
ConTrack* t = (ConTrack*)
|
||||
ase_awk_alloc (awk, ASE_SIZEOF(ConTrack));
|
||||
if (t == ASE_NULL)
|
||||
{
|
||||
if (fp != stdin && fp != stdout) fclose (fp);
|
||||
return -1;
|
||||
}
|
||||
|
||||
t->handle = fp;
|
||||
t->nextConIdx = 1;
|
||||
|
||||
if (fn != ASE_NULL)
|
||||
{
|
||||
if (io.setFileName(fn) == -1)
|
||||
{
|
||||
if (fp != stdin && fp != stdout) fclose (fp);
|
||||
ase_awk_free (awk, t);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
io.setHandle (t);
|
||||
return 1;
|
||||
}
|
||||
|
||||
int closeConsole (Console& io)
|
||||
{
|
||||
ConTrack* t = (ConTrack*)io.getHandle();
|
||||
FILE* fp = t->handle;
|
||||
|
||||
if (fp == stdout || fp == stderr) fflush (fp);
|
||||
if (fp != stdin && fp != stdout && fp != stderr) fclose (fp);
|
||||
|
||||
ase_awk_free (awk, t);
|
||||
return 0;
|
||||
}
|
||||
|
||||
ssize_t readConsole (Console& io, char_t* buf, size_t len)
|
||||
{
|
||||
ConTrack* t = (ConTrack*)io.getHandle();
|
||||
FILE* fp = t->handle;
|
||||
ssize_t n = 0;
|
||||
|
||||
while (n < (ssize_t)len)
|
||||
{
|
||||
ase_cint_t c = ase_fgetc (fp);
|
||||
if (c == ASE_CHAR_EOF)
|
||||
{
|
||||
if (ase_ferror(fp)) return -1;
|
||||
if (t->nextConIdx >= numConInFiles) break;
|
||||
|
||||
const char_t* fn = conInFile[t->nextConIdx];
|
||||
FILE* nfp = ase_fopen (fn, ASE_T("r"));
|
||||
if (nfp == ASE_NULL) return -1;
|
||||
|
||||
if (io.setFileName(fn) == -1 || io.setFNR(0) == -1)
|
||||
{
|
||||
fclose (nfp);
|
||||
return -1;
|
||||
}
|
||||
|
||||
fclose (fp);
|
||||
fp = nfp;
|
||||
t->nextConIdx++;
|
||||
t->handle = fp;
|
||||
|
||||
if (n == 0) continue;
|
||||
else break;
|
||||
}
|
||||
|
||||
buf[n++] = c;
|
||||
if (c == ASE_T('\n')) break;
|
||||
}
|
||||
|
||||
return n;
|
||||
}
|
||||
|
||||
ssize_t writeConsole (Console& io, char_t* buf, size_t len)
|
||||
{
|
||||
ConTrack* t = (ConTrack*)io.getHandle();
|
||||
FILE* fp = t->handle;
|
||||
size_t left = len;
|
||||
|
||||
while (left > 0)
|
||||
{
|
||||
if (*buf == ASE_T('\0'))
|
||||
{
|
||||
if (ase_fputc (*buf, fp) == ASE_CHAR_EOF) return -1;
|
||||
left -= 1; buf += 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
int chunk = (left > ASE_TYPE_MAX(int))? ASE_TYPE_MAX(int): (int)left;
|
||||
int n = ase_fprintf (fp, ASE_T("%.*s"), chunk, buf);
|
||||
if (n < 0 || n > chunk) return -1;
|
||||
left -= n; buf += n;
|
||||
}
|
||||
}
|
||||
|
||||
return len;
|
||||
}
|
||||
|
||||
int flushConsole (Console& io)
|
||||
{
|
||||
ConTrack* t = (ConTrack*)io.getHandle();
|
||||
FILE* fp = t->handle;
|
||||
return ::fflush (fp);
|
||||
}
|
||||
|
||||
int nextConsole (Console& io)
|
||||
{
|
||||
#if defined(_MSC_VER) && (_MSC_VER<1400)
|
||||
StdAwk::Console::Mode mode = io.getMode();
|
||||
#else
|
||||
ASE::StdAwk::Console::Mode mode = io.getMode();
|
||||
#endif
|
||||
ConTrack* t = (ConTrack*)io.getHandle();
|
||||
FILE* ofp = t->handle;
|
||||
FILE* nfp = ASE_NULL;
|
||||
const char_t* fn = ASE_NULL;
|
||||
|
||||
switch (mode)
|
||||
{
|
||||
#if defined(_MSC_VER) && (_MSC_VER<1400)
|
||||
case StdAwk::Console::READ:
|
||||
#else
|
||||
case ASE::StdAwk::Console::READ:
|
||||
#endif
|
||||
if (t->nextConIdx >= numConInFiles) return 0;
|
||||
fn = conInFile[t->nextConIdx];
|
||||
nfp = ase_fopen (fn, ASE_T("r"));
|
||||
break;
|
||||
|
||||
#if defined(_MSC_VER) && (_MSC_VER<1400)
|
||||
case StdAwk::Console::WRITE:
|
||||
#else
|
||||
case ASE::StdAwk::Console::WRITE:
|
||||
#endif
|
||||
if (t->nextConIdx >= numConOutFiles) return 0;
|
||||
fn = conOutFile[t->nextConIdx];
|
||||
nfp = ase_fopen (fn, ASE_T("w"));
|
||||
break;
|
||||
}
|
||||
|
||||
if (nfp == ASE_NULL) return -1;
|
||||
|
||||
if (fn != ASE_NULL)
|
||||
{
|
||||
if (io.setFileName (fn) == -1)
|
||||
{
|
||||
fclose (nfp);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
fclose (ofp);
|
||||
|
||||
t->nextConIdx++;
|
||||
t->handle = nfp;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
void* allocMem (size_t n)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
return ::HeapAlloc (heap, 0, n);
|
||||
#else
|
||||
return ::malloc (n);
|
||||
#endif
|
||||
}
|
||||
|
||||
void* reallocMem (void* ptr, size_t n)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
if (ptr == NULL)
|
||||
return ::HeapAlloc (heap, 0, n);
|
||||
else
|
||||
return ::HeapReAlloc (heap, 0, ptr, n);
|
||||
#else
|
||||
return ::realloc (ptr, n);
|
||||
#endif
|
||||
}
|
||||
|
||||
void freeMem (void* ptr)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
::HeapFree (heap, 0, ptr);
|
||||
#else
|
||||
::free (ptr);
|
||||
#endif
|
||||
}
|
||||
|
||||
private:
|
||||
const char_t* srcInName;
|
||||
const char_t* srcOutName;
|
||||
|
||||
struct ConTrack
|
||||
{
|
||||
FILE* handle;
|
||||
size_t nextConIdx;
|
||||
};
|
||||
|
||||
size_t numConInFiles;
|
||||
const char_t* conInFile[128];
|
||||
|
||||
size_t numConOutFiles;
|
||||
const char_t* conOutFile[128];
|
||||
|
||||
int idLastSleep;
|
||||
|
||||
#ifdef _WIN32
|
||||
void* heap;
|
||||
#endif
|
||||
};
|
||||
|
||||
#ifndef NDEBUG
|
||||
void ase_assert_abort (void)
|
||||
{
|
||||
abort ();
|
||||
}
|
||||
|
||||
void ase_assert_printf (const ase_char_t* fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
#ifdef _WIN32
|
||||
int n;
|
||||
ase_char_t buf[1024];
|
||||
#endif
|
||||
|
||||
va_start (ap, fmt);
|
||||
#if defined(_WIN32)
|
||||
n = _vsntprintf (buf, ASE_COUNTOF(buf), fmt, ap);
|
||||
if (n < 0) buf[ASE_COUNTOF(buf)-1] = ASE_T('\0');
|
||||
|
||||
#if defined(_MSC_VER) && (_MSC_VER<1400)
|
||||
MessageBox (NULL, buf,
|
||||
ASE_T("Assertion Failure"), MB_OK|MB_ICONERROR);
|
||||
#else
|
||||
MessageBox (NULL, buf,
|
||||
ASE_T("\uB2DD\uAE30\uB9AC \uC870\uB610"), MB_OK|MB_ICONERROR);
|
||||
#endif
|
||||
#else
|
||||
ase_vprintf (fmt, ap);
|
||||
#endif
|
||||
va_end (ap);
|
||||
}
|
||||
#endif
|
||||
|
||||
static void print_error (const ase_char_t* msg)
|
||||
{
|
||||
ase_printf (ASE_T("Error: %s\n"), msg);
|
||||
}
|
||||
|
||||
static struct
|
||||
{
|
||||
const ase_char_t* name;
|
||||
TestAwk::Option opt;
|
||||
} otab[] =
|
||||
{
|
||||
{ ASE_T("implicit"), TestAwk::OPT_IMPLICIT },
|
||||
{ ASE_T("explicit"), TestAwk::OPT_EXPLICIT },
|
||||
{ ASE_T("bxor"), TestAwk::OPT_BXOR },
|
||||
{ ASE_T("shift"), TestAwk::OPT_SHIFT },
|
||||
{ ASE_T("idiv"), TestAwk::OPT_IDIV },
|
||||
{ ASE_T("extio"), TestAwk::OPT_EXTIO },
|
||||
{ ASE_T("newline"), TestAwk::OPT_NEWLINE },
|
||||
{ ASE_T("baseone"), TestAwk::OPT_BASEONE },
|
||||
{ ASE_T("stripspaces"), TestAwk::OPT_STRIPSPACES },
|
||||
{ ASE_T("nextofile"), TestAwk::OPT_NEXTOFILE },
|
||||
{ ASE_T("crlf"), TestAwk::OPT_CRLF },
|
||||
{ ASE_T("argstomain"), TestAwk::OPT_ARGSTOMAIN },
|
||||
{ ASE_T("reset"), TestAwk::OPT_RESET },
|
||||
{ ASE_T("maptovar"), TestAwk::OPT_MAPTOVAR },
|
||||
{ ASE_T("pablock"), TestAwk::OPT_PABLOCK }
|
||||
};
|
||||
|
||||
static void print_usage (const ase_char_t* argv0)
|
||||
{
|
||||
const ase_char_t* base;
|
||||
int j;
|
||||
|
||||
base = ase_strrchr(argv0, ASE_T('/'));
|
||||
if (base == ASE_NULL) base = ase_strrchr(argv0, ASE_T('\\'));
|
||||
if (base == ASE_NULL) base = argv0; else base++;
|
||||
|
||||
ase_printf (ASE_T("Usage: %s [-m main] [-si file]? [-so file]? [-ci file]* [-co file]* [-a arg]* [-w o:n]* \n"), base);
|
||||
ase_printf (ASE_T(" -m main Specify the main function name\n"));
|
||||
ase_printf (ASE_T(" -si file Specify the input source file\n"));
|
||||
ase_printf (ASE_T(" The source code is read from stdin when it is not specified\n"));
|
||||
ase_printf (ASE_T(" -so file Specify the output source file\n"));
|
||||
ase_printf (ASE_T(" The deparsed code is not output when is it not specified\n"));
|
||||
ase_printf (ASE_T(" -ci file Specify the input console file\n"));
|
||||
ase_printf (ASE_T(" -co file Specify the output console file\n"));
|
||||
ase_printf (ASE_T(" -a str Specify an argument\n"));
|
||||
ase_printf (ASE_T(" -w o:n Specify an old and new word pair\n"));
|
||||
ase_printf (ASE_T(" o - an original word\n"));
|
||||
ase_printf (ASE_T(" n - the new word to replace the original\n"));
|
||||
ase_printf (ASE_T(" -v Print extra messages\n"));
|
||||
|
||||
|
||||
ase_printf (ASE_T("\nYou may specify the following options to change the behavior of the interpreter.\n"));
|
||||
for (j = 0; j < ASE_COUNTOF(otab); j++)
|
||||
{
|
||||
ase_printf (ASE_T(" -%-20s -no%-20s\n"), otab[j].name, otab[j].name);
|
||||
}
|
||||
}
|
||||
|
||||
static int awk_main (int argc, ase_char_t* argv[])
|
||||
{
|
||||
TestAwk awk;
|
||||
|
||||
int mode = 0;
|
||||
const ase_char_t* mainfn = NULL;
|
||||
const ase_char_t* srcin = ASE_T("");
|
||||
const ase_char_t* srcout = NULL;
|
||||
const ase_char_t* args[256];
|
||||
ase_size_t nargs = 0;
|
||||
ase_size_t nsrcins = 0;
|
||||
ase_size_t nsrcouts = 0;
|
||||
|
||||
if (awk.open() == -1)
|
||||
{
|
||||
ase_fprintf (stderr, ASE_T("cannot open awk\n"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
for (int i = 1; i < argc; i++)
|
||||
{
|
||||
if (mode == 0)
|
||||
{
|
||||
if (ase_strcmp(argv[i], ASE_T("-si")) == 0) mode = 1;
|
||||
else if (ase_strcmp(argv[i], ASE_T("-so")) == 0) mode = 2;
|
||||
else if (ase_strcmp(argv[i], ASE_T("-ci")) == 0) mode = 3;
|
||||
else if (ase_strcmp(argv[i], ASE_T("-co")) == 0) mode = 4;
|
||||
else if (ase_strcmp(argv[i], ASE_T("-a")) == 0) mode = 5;
|
||||
else if (ase_strcmp(argv[i], ASE_T("-m")) == 0) mode = 6;
|
||||
else if (ase_strcmp(argv[i], ASE_T("-w")) == 0) mode = 7;
|
||||
else if (ase_strcmp(argv[i], ASE_T("-v")) == 0)
|
||||
{
|
||||
verbose = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (argv[i][0] == ASE_T('-'))
|
||||
{
|
||||
int j;
|
||||
|
||||
if (argv[i][1] == ASE_T('n') && argv[i][2] == ASE_T('o'))
|
||||
{
|
||||
for (j = 0; j < ASE_COUNTOF(otab); j++)
|
||||
{
|
||||
if (ase_strcmp(&argv[i][3], otab[j].name) == 0)
|
||||
{
|
||||
awk.setOption (awk.getOption() & ~otab[j].opt);
|
||||
goto ok_valid;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (j = 0; j < ASE_COUNTOF(otab); j++)
|
||||
{
|
||||
if (ase_strcmp(&argv[i][1], otab[j].name) == 0)
|
||||
{
|
||||
awk.setOption (awk.getOption() | otab[j].opt);
|
||||
goto ok_valid;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
print_usage (argv[0]);
|
||||
return -1;
|
||||
|
||||
ok_valid:
|
||||
;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (argv[i][0] == ASE_T('-'))
|
||||
{
|
||||
print_usage (argv[0]);
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (mode == 1) // source input
|
||||
{
|
||||
if (nsrcins != 0)
|
||||
{
|
||||
print_usage (argv[0]);
|
||||
return -1;
|
||||
}
|
||||
|
||||
srcin = argv[i];
|
||||
nsrcins++;
|
||||
mode = 0;
|
||||
}
|
||||
else if (mode == 2) // source output
|
||||
{
|
||||
if (nsrcouts != 0)
|
||||
{
|
||||
print_usage (argv[0]);
|
||||
return -1;
|
||||
}
|
||||
|
||||
srcout = argv[i];
|
||||
nsrcouts++;
|
||||
mode = 0;
|
||||
}
|
||||
else if (mode == 3) // console input
|
||||
{
|
||||
if (awk.addConsoleInput (argv[i]) == -1)
|
||||
{
|
||||
print_error (ASE_T("too many console inputs"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
mode = 0;
|
||||
}
|
||||
else if (mode == 4) // console output
|
||||
{
|
||||
if (awk.addConsoleOutput (argv[i]) == -1)
|
||||
{
|
||||
print_error (ASE_T("too many console outputs"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
mode = 0;
|
||||
}
|
||||
else if (mode == 5) // argument mode
|
||||
{
|
||||
if (nargs >= ASE_COUNTOF(args))
|
||||
{
|
||||
print_usage (argv[0]);
|
||||
return -1;
|
||||
}
|
||||
|
||||
args[nargs++] = argv[i];
|
||||
mode = 0;
|
||||
}
|
||||
else if (mode == 6) // entry point
|
||||
{
|
||||
if (mainfn != NULL)
|
||||
{
|
||||
print_usage (argv[0]);
|
||||
return -1;
|
||||
}
|
||||
|
||||
mainfn = argv[i];
|
||||
mode = 0;
|
||||
}
|
||||
else if (mode == 7) // word replacement
|
||||
{
|
||||
const ase_char_t* p;
|
||||
ase_size_t l;
|
||||
|
||||
p = ase_strchr(argv[i], ASE_T(':'));
|
||||
if (p == ASE_NULL)
|
||||
{
|
||||
print_usage (argv[0]);
|
||||
return -1;
|
||||
}
|
||||
|
||||
l = ase_strlen (argv[i]);
|
||||
|
||||
awk.setWord (
|
||||
argv[i], p - argv[i],
|
||||
p + 1, l - (p - argv[i] + 1));
|
||||
|
||||
mode = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (mode != 0)
|
||||
{
|
||||
print_usage (argv[0]);
|
||||
awk.close ();
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
if (awk.parse (srcin, srcout) == -1)
|
||||
{
|
||||
ase_fprintf (stderr, ASE_T("cannot parse: LINE[%d] %s\n"),
|
||||
awk.getErrorLine(), awk.getErrorMessage());
|
||||
awk.close ();
|
||||
return -1;
|
||||
}
|
||||
|
||||
awk.enableRunCallback ();
|
||||
|
||||
if (awk.run (mainfn, args, nargs) == -1)
|
||||
{
|
||||
ase_fprintf (stderr, ASE_T("cannot run: LINE[%d] %s\n"),
|
||||
awk.getErrorLine(), awk.getErrorMessage());
|
||||
awk.close ();
|
||||
return -1;
|
||||
}
|
||||
|
||||
awk.close ();
|
||||
return 0;
|
||||
}
|
||||
|
||||
extern "C" int ase_main (int argc, ase_achar_t* argv[])
|
||||
{
|
||||
int n;
|
||||
|
||||
#if defined(__linux) && defined(_DEBUG)
|
||||
mtrace ();
|
||||
#endif
|
||||
#if defined(_WIN32) && defined(_DEBUG) && defined(_MSC_VER)
|
||||
_CrtSetDbgFlag (_CRTDBG_LEAK_CHECK_DF | _CRTDBG_ALLOC_MEM_DF);
|
||||
#endif
|
||||
|
||||
n = ase_runmain (argc,argv,awk_main);
|
||||
|
||||
#if defined(__linux) && defined(_DEBUG)
|
||||
muntrace ();
|
||||
#endif
|
||||
#if defined(_WIN32) && defined(_DEBUG)
|
||||
/* #if defined(_MSC_VER)
|
||||
_CrtDumpMemoryLeaks ();
|
||||
#endif */
|
||||
_tprintf (_T("Press ENTER to quit\n"));
|
||||
getchar ();
|
||||
#endif
|
||||
|
||||
return n;
|
||||
}
|
9
qse/cmd/awk/adr-001.awk
Normal file
9
qse/cmd/awk/adr-001.awk
Normal file
@ -0,0 +1,9 @@
|
||||
#!/bin/awk
|
||||
|
||||
BEGIN {
|
||||
RS = "\n\n";
|
||||
FS = "\n";
|
||||
}
|
||||
{
|
||||
print $1, $NF;
|
||||
}
|
12
qse/cmd/awk/adr-001.out
Normal file
12
qse/cmd/awk/adr-001.out
Normal file
@ -0,0 +1,12 @@
|
||||
BEGIN {
|
||||
RS = "\n\n";
|
||||
FS = "\n";
|
||||
}
|
||||
|
||||
{
|
||||
print $1,$NF;
|
||||
}
|
||||
|
||||
James Brown 012-345-678
|
||||
Richie Ren 02-3473-9192
|
||||
Toh WeeKung 9102-1203
|
15
qse/cmd/awk/adr-en.data
Normal file
15
qse/cmd/awk/adr-en.data
Normal file
@ -0,0 +1,15 @@
|
||||
James Brown
|
||||
IBM
|
||||
Somewhere over the rainbow
|
||||
012-345-678
|
||||
|
||||
Richie Ren
|
||||
Ezsystem
|
||||
Taipei Taiwan
|
||||
02-3473-9192
|
||||
|
||||
Toh WeeKung
|
||||
Topaz
|
||||
Singapore
|
||||
9102-1203
|
||||
|
34
qse/cmd/awk/arg.awk
Normal file
34
qse/cmd/awk/arg.awk
Normal file
@ -0,0 +1,34 @@
|
||||
BEGIN {
|
||||
print "ARGC=", ARGC;
|
||||
for (i in ARGV)
|
||||
{
|
||||
print "ARGV[" i "]", ARGV[i];
|
||||
}
|
||||
|
||||
print "----------------------";
|
||||
print "ARGC=", ARGC;
|
||||
split ("111 22 333 555 666 777", ARGV);
|
||||
for (i in ARGV)
|
||||
{
|
||||
print "ARGV[" i "]", ARGV[i];
|
||||
}
|
||||
|
||||
#for (i = 0
|
||||
# i < 20
|
||||
# i;;) print "[" i "]";
|
||||
#for (i = 0
|
||||
# (i < 20)
|
||||
# i;;) print "[" i "]";
|
||||
|
||||
#printf 10, 20, 30;
|
||||
if (ARGC >= 0) printf ("ARGC [%++#10.10i] is positive\n", 10);
|
||||
if (ARGC >= 0) printf ("ARGC [%++#10.10f] is positive\n", 10);
|
||||
if (ARGC >= 0) printf ("ARGC [%++#10.10E] is positive\n", 10124.1123);
|
||||
if (ARGC >= 0) printf ("ARGC [%++#10.10G] is positive\n", 10124.1123);
|
||||
if (ARGC >= 0) printf ("ARGC [%++#10.10g] is positive\n", 10124.1123);
|
||||
if (ARGC >= 0) printf ("ARGC [%++#10.10f] is positive\n", 10124.1123);
|
||||
printf ("[%d], [%f], [%s]\n", 10124.1123, 10124.1123, 10124.1123);
|
||||
printf ("[%-10c] [% 0*.*d]\n", 65, 45, 48, -1);
|
||||
|
||||
print sprintf ("abc%d %*.*d %c %s %c", 10, 20, 30, 40, "good", "good", 75.34);
|
||||
}
|
18
qse/cmd/awk/arr.awk
Normal file
18
qse/cmd/awk/arr.awk
Normal file
@ -0,0 +1,18 @@
|
||||
BEGIN {
|
||||
a[1,2,3] = 20;
|
||||
a[4,5,6] = 30;
|
||||
|
||||
for (i in a)
|
||||
{
|
||||
n = split (i, k, SUBSEP);
|
||||
for (j = 1; j < n; j++)
|
||||
{
|
||||
print k[j]
|
||||
}
|
||||
}
|
||||
|
||||
if ((1,2,3) in a)
|
||||
{
|
||||
print a[1,2,3];
|
||||
}
|
||||
}
|
261
qse/cmd/awk/aseawk++.bdsproj
Normal file
261
qse/cmd/awk/aseawk++.bdsproj
Normal file
@ -0,0 +1,261 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<BorlandProject>
|
||||
<PersonalityInfo>
|
||||
<Option>
|
||||
<Option Name="Personality">CPlusPlusBuilder.Personality</Option>
|
||||
<Option Name="ProjectType">Application</Option>
|
||||
<Option Name="Version">1.0</Option>
|
||||
<Option Name="GUID">{F0848980-053C-44B1-B7A0-4C834C1EB585}</Option>
|
||||
</Option>
|
||||
</PersonalityInfo>
|
||||
<CPlusPlusBuilder.Personality>
|
||||
<Source>
|
||||
<Source Name="MainSource">Awk.cpp</Source>
|
||||
</Source>
|
||||
<BCBPROJECT>
|
||||
<project version="10.0">
|
||||
<property category="build.config" name="active" value="0"/>
|
||||
<property category="build.config" name="count" value="1"/>
|
||||
<property category="build.config" name="excludedefaultforzero" value="0"/>
|
||||
<property category="build.config.0" name="builddir" value="Debug"/>
|
||||
<property category="build.config.0" name="key" value="Debug_Build"/>
|
||||
<property category="build.config.0" name="name" value="Debug Build"/>
|
||||
<property category="build.config.0" name="settings.win32b" value="default"/>
|
||||
<property category="build.config.0" name="type" value="Toolset"/>
|
||||
<property category="build.config.0" name="win32.win32b.builddir" value="debug"/>
|
||||
<property category="build.config.1" name="key" value="Release_Build"/>
|
||||
<property category="build.config.1" name="name" value="Release Build"/>
|
||||
<property category="build.config.1" name="settings.win32b" value="default"/>
|
||||
<property category="build.config.1" name="type" value="Toolset"/>
|
||||
<property category="build.config.1" name="win32.win32b.builddir" value="release"/>
|
||||
<property category="build.node" name="lastconfig" value="Debug_Build"/>
|
||||
<property category="build.node" name="name" value="aseawk++.exe"/>
|
||||
<property category="build.node" name="packages" value="vclx;vcl;rtl;dbrtl;vcldb;adortl;dbxcds;dbexpress;xmlrtl;vclie;inet;inetdbbde;inetdbxpress;soaprtl;dsnap;bdertl;vcldbx"/>
|
||||
<property category="build.node" name="use_packages" value="0"/>
|
||||
<property category="build.platform" name="active" value="win32"/>
|
||||
<property category="build.platform" name="win32.Debug_Build.toolset" value="win32b"/>
|
||||
<property category="build.platform" name="win32.Release_Build.toolset" value="win32b"/>
|
||||
<property category="build.platform" name="win32.default" value="win32b"/>
|
||||
<property category="build.platform" name="win32.enabled" value="1"/>
|
||||
<property category="build.platform" name="win32.win32b.enabled" value="1"/>
|
||||
<property category="win32.*.win32b.dcc32" name="param.filenames.merge" value="1"/>
|
||||
<property category="win32.*.win32b.tasm32" name="param.listfile.merge" value="1"/>
|
||||
<property category="win32.*.win32b.tasm32" name="param.objfile.merge" value="1"/>
|
||||
<property category="win32.*.win32b.tasm32" name="param.xreffile.merge" value="1"/>
|
||||
<property category="win32.Debug_Build.win32b.bcc32" name="option.D.arg.1" value="_DEBUG"/>
|
||||
<property category="win32.Debug_Build.win32b.bcc32" name="option.D.arg.merge" value="1"/>
|
||||
<property category="win32.Debug_Build.win32b.bcc32" name="option.D.enabled" value="1"/>
|
||||
<property category="win32.Debug_Build.win32b.bcc32" name="option.Od.enabled" value="1"/>
|
||||
<property category="win32.Debug_Build.win32b.bcc32" name="option.k.enabled" value="1"/>
|
||||
<property category="win32.Debug_Build.win32b.bcc32" name="option.n.arg.1" value="debug\cpp"/>
|
||||
<property category="win32.Debug_Build.win32b.bcc32" name="option.n.arg.merge" value="0"/>
|
||||
<property category="win32.Debug_Build.win32b.bcc32" name="option.n.enabled" value="1"/>
|
||||
<property category="win32.Debug_Build.win32b.bcc32" name="option.r.enabled" value="0"/>
|
||||
<property category="win32.Debug_Build.win32b.bcc32" name="option.v.enabled" value="1"/>
|
||||
<property category="win32.Debug_Build.win32b.bcc32" name="option.vG.enabled" value="0"/>
|
||||
<property category="win32.Debug_Build.win32b.bcc32" name="option.vi.enabled" value="0"/>
|
||||
<property category="win32.Debug_Build.win32b.bcc32" name="option.y.enabled" value="1"/>
|
||||
<property category="win32.Debug_Build.win32b.dcc32" name="option.$D.enabled" value="1"/>
|
||||
<property category="win32.Debug_Build.win32b.dcc32" name="option.$O.enabled" value="0"/>
|
||||
<property category="win32.Debug_Build.win32b.dcc32" name="option.D.arg.1" value="DEBUG"/>
|
||||
<property category="win32.Debug_Build.win32b.dcc32" name="option.D.arg.merge" value="1"/>
|
||||
<property category="win32.Debug_Build.win32b.dcc32" name="option.D.enabled" value="1"/>
|
||||
<property category="win32.Debug_Build.win32b.dcc32" name="option.V.enabled" value="1"/>
|
||||
<property category="win32.Debug_Build.win32b.ilink32" name="option.L.arg.1" value="..\..\debug\lib"/>
|
||||
<property category="win32.Debug_Build.win32b.ilink32" name="option.L.arg.2" value="$(BDS)\lib\debug"/>
|
||||
<property category="win32.Debug_Build.win32b.ilink32" name="option.L.arg.merge" value="1"/>
|
||||
<property category="win32.Debug_Build.win32b.ilink32" name="option.L.enabled" value="1"/>
|
||||
<property category="win32.Debug_Build.win32b.tasm32" name="option.z.enabled" value="1"/>
|
||||
<property category="win32.Debug_Build.win32b.tasm32" name="option.zd.enabled" value="0"/>
|
||||
<property category="win32.Debug_Build.win32b.tasm32" name="option.zi.enabled" value="1"/>
|
||||
<property category="win32.Release_Build.win32b.bcc32" name="container.SelectedOptimizations.containerenabled" value="0"/>
|
||||
<property category="win32.Release_Build.win32b.bcc32" name="container.SelectedWarnings.containerenabled" value="1"/>
|
||||
<property category="win32.Release_Build.win32b.bcc32" name="option.D.arg.1" value="NDEBUG"/>
|
||||
<property category="win32.Release_Build.win32b.bcc32" name="option.D.arg.merge" value="1"/>
|
||||
<property category="win32.Release_Build.win32b.bcc32" name="option.D.enabled" value="1"/>
|
||||
<property category="win32.Release_Build.win32b.bcc32" name="option.O1.enabled" value="0"/>
|
||||
<property category="win32.Release_Build.win32b.bcc32" name="option.O2.enabled" value="1"/>
|
||||
<property category="win32.Release_Build.win32b.bcc32" name="option.Od.enabled" value="0"/>
|
||||
<property category="win32.Release_Build.win32b.bcc32" name="option.disablewarns.enabled" value="0"/>
|
||||
<property category="win32.Release_Build.win32b.bcc32" name="option.k.enabled" value="0"/>
|
||||
<property category="win32.Release_Build.win32b.bcc32" name="option.n.arg.1" value="release\cpp"/>
|
||||
<property category="win32.Release_Build.win32b.bcc32" name="option.n.arg.merge" value="0"/>
|
||||
<property category="win32.Release_Build.win32b.bcc32" name="option.n.enabled" value="1"/>
|
||||
<property category="win32.Release_Build.win32b.bcc32" name="option.r.enabled" value="1"/>
|
||||
<property category="win32.Release_Build.win32b.bcc32" name="option.vi.enabled" value="1"/>
|
||||
<property category="win32.Release_Build.win32b.bcc32" name="option.w.enabled" value="0"/>
|
||||
<property category="win32.Release_Build.win32b.dcc32" name="option.$D.enabled" value="0"/>
|
||||
<property category="win32.Release_Build.win32b.dcc32" name="option.$O.enabled" value="1"/>
|
||||
<property category="win32.Release_Build.win32b.dcc32" name="option.V.enabled" value="0"/>
|
||||
<property category="win32.Release_Build.win32b.ilink32" name="container.SelectedWarnings.containerenabled" value="1"/>
|
||||
<property category="win32.Release_Build.win32b.ilink32" name="option.L.arg.1" value="..\..\release\lib"/>
|
||||
<property category="win32.Release_Build.win32b.ilink32" name="option.L.arg.2" value="$(BDS)\lib\release"/>
|
||||
<property category="win32.Release_Build.win32b.ilink32" name="option.L.arg.merge" value="1"/>
|
||||
<property category="win32.Release_Build.win32b.ilink32" name="option.L.enabled" value="1"/>
|
||||
<property category="win32.Release_Build.win32b.ilink32" name="option.outputdir.arg.1" value="..\..\release\bin"/>
|
||||
<property category="win32.Release_Build.win32b.ilink32" name="option.outputdir.arg.merge" value="0"/>
|
||||
<property category="win32.Release_Build.win32b.ilink32" name="option.outputdir.enabled" value="1"/>
|
||||
<property category="win32.Release_Build.win32b.tasm32" name="option.z.enabled" value="0"/>
|
||||
<property category="win32.Release_Build.win32b.tasm32" name="option.zd.enabled" value="0"/>
|
||||
<property category="win32.Release_Build.win32b.tasm32" name="option.zi.enabled" value="0"/>
|
||||
<property category="win32.Release_Build.win32b.tasm32" name="option.zn.enabled" value="1"/>
|
||||
<optionset name="all_configurations">
|
||||
<property category="node" name="displayname" value="All Configurations"/>
|
||||
<property category="win32.*.win32b.bcc32" name="option.H=.arg.1" value="$(BDS)\lib\vcl100.csm"/>
|
||||
<property category="win32.*.win32b.bcc32" name="option.H=.arg.merge" value="1"/>
|
||||
<property category="win32.*.win32b.bcc32" name="option.H=.enabled" value="1"/>
|
||||
<property category="win32.*.win32b.bcc32" name="option.Hc.enabled" value="1"/>
|
||||
<property category="win32.*.win32b.bcc32" name="option.I.arg.1" value="..\..\.."/>
|
||||
<property category="win32.*.win32b.bcc32" name="option.I.arg.2" value="$(BDS)\include"/>
|
||||
<property category="win32.*.win32b.bcc32" name="option.I.arg.3" value="$(BDS)\include\dinkumware"/>
|
||||
<property category="win32.*.win32b.bcc32" name="option.I.arg.4" value="$(BDS)\include\vcl"/>
|
||||
<property category="win32.*.win32b.bcc32" name="option.I.arg.merge" value="1"/>
|
||||
<property category="win32.*.win32b.bcc32" name="option.I.enabled" value="1"/>
|
||||
<property category="win32.*.win32b.bcc32" name="option.Ve.enabled" value="0"/>
|
||||
<property category="win32.*.win32b.bcc32" name="option.additional_switches.arg" value=""/>
|
||||
<property category="win32.*.win32b.bcc32" name="option.additional_switches.arg.merge" value="1"/>
|
||||
<property category="win32.*.win32b.bcc32" name="option.additional_switches.enabled" value="0"/>
|
||||
<property category="win32.*.win32b.bcc32" name="option.b.enabled" value="0"/>
|
||||
<property category="win32.*.win32b.bcc32" name="option.sysdefines.arg.1" value="_RTLDLL"/>
|
||||
<property category="win32.*.win32b.bcc32" name="option.sysdefines.arg.2" value="NO_STRICT"/>
|
||||
<property category="win32.*.win32b.bcc32" name="option.sysdefines.arg.3" value="_NO_VCL"/>
|
||||
<property category="win32.*.win32b.bcc32" name="option.sysdefines.arg.merge" value="1"/>
|
||||
<property category="win32.*.win32b.bcc32" name="option.sysdefines.enabled" value="1"/>
|
||||
<property category="win32.*.win32b.bcc32" name="option.tW.enabled" value="0"/>
|
||||
<property category="win32.*.win32b.bcc32" name="option.tWC.enabled" value="1"/>
|
||||
<property category="win32.*.win32b.bcc32" name="option.tWD.enabled" value="0"/>
|
||||
<property category="win32.*.win32b.bcc32" name="option.tWM.enabled" value="1"/>
|
||||
<property category="win32.*.win32b.dcc32" name="option.I.arg.1" value="C:\projects\ase\cmd\awk"/>
|
||||
<property category="win32.*.win32b.dcc32" name="option.I.arg.merge" value="1"/>
|
||||
<property category="win32.*.win32b.dcc32" name="option.I.enabled" value="0"/>
|
||||
<property category="win32.*.win32b.dcc32" name="option.O.arg.1" value="C:\projects\ase\cmd\awk"/>
|
||||
<property category="win32.*.win32b.dcc32" name="option.O.arg.merge" value="1"/>
|
||||
<property category="win32.*.win32b.dcc32" name="option.O.enabled" value="0"/>
|
||||
<property category="win32.*.win32b.dcc32" name="option.R.arg.1" value="C:\projects\ase\cmd\awk"/>
|
||||
<property category="win32.*.win32b.dcc32" name="option.R.arg.merge" value="1"/>
|
||||
<property category="win32.*.win32b.dcc32" name="option.R.enabled" value="0"/>
|
||||
<property category="win32.*.win32b.dcc32" name="option.U.arg.1" value="C:\projects\ase\cmd\awk"/>
|
||||
<property category="win32.*.win32b.dcc32" name="option.U.arg.2" value="C:\Documents and Settings\root\My Documents\Borland Studio Projects"/>
|
||||
<property category="win32.*.win32b.dcc32" name="option.U.arg.3" value="$(BDS)\lib"/>
|
||||
<property category="win32.*.win32b.dcc32" name="option.U.arg.4" value="$(BDS)\lib\obj"/>
|
||||
<property category="win32.*.win32b.dcc32" name="option.U.arg.merge" value="1"/>
|
||||
<property category="win32.*.win32b.dcc32" name="option.U.enabled" value="1"/>
|
||||
<property category="win32.*.win32b.dcc32" name="param.filenames.merge" value="1"/>
|
||||
<property category="win32.*.win32b.idl2cpp" name="option.I.arg.1" value="C:\projects\ase\cmd\awk"/>
|
||||
<property category="win32.*.win32b.idl2cpp" name="option.I.arg.merge" value="1"/>
|
||||
<property category="win32.*.win32b.idl2cpp" name="option.I.enabled" value="1"/>
|
||||
<property category="win32.*.win32b.ilink32" name="container.SelectedWarnings.containerenabled" value="1"/>
|
||||
<property category="win32.*.win32b.ilink32" name="option.-w-.enabled" value="0"/>
|
||||
<property category="win32.*.win32b.ilink32" name="option.Gi.enabled" value="0"/>
|
||||
<property category="win32.*.win32b.ilink32" name="option.Gpd.enabled" value="0"/>
|
||||
<property category="win32.*.win32b.ilink32" name="option.Gpr.enabled" value="0"/>
|
||||
<property category="win32.*.win32b.ilink32" name="option.L.arg.1" value="$(BDS)\lib"/>
|
||||
<property category="win32.*.win32b.ilink32" name="option.L.arg.2" value="$(BDS)\lib\obj"/>
|
||||
<property category="win32.*.win32b.ilink32" name="option.L.arg.3" value="$(BDS)\lib\psdk"/>
|
||||
<property category="win32.*.win32b.ilink32" name="option.L.arg.merge" value="1"/>
|
||||
<property category="win32.*.win32b.ilink32" name="option.L.enabled" value="1"/>
|
||||
<property category="win32.*.win32b.ilink32" name="option.Tpd.enabled" value="0"/>
|
||||
<property category="win32.*.win32b.ilink32" name="option.Tpe.enabled" value="1"/>
|
||||
<property category="win32.*.win32b.ilink32" name="option.Tpp.enabled" value="0"/>
|
||||
<property category="win32.*.win32b.ilink32" name="option.aa.enabled" value="0"/>
|
||||
<property category="win32.*.win32b.ilink32" name="option.ap.enabled" value="1"/>
|
||||
<property category="win32.*.win32b.ilink32" name="option.dynamicrtl.enabled" value="0"/>
|
||||
<property category="win32.*.win32b.ilink32" name="option.j.arg.1" value="C:\projects\ase\cmd\awk"/>
|
||||
<property category="win32.*.win32b.ilink32" name="option.j.arg.merge" value="1"/>
|
||||
<property category="win32.*.win32b.ilink32" name="option.j.enabled" value="0"/>
|
||||
<property category="win32.*.win32b.ilink32" name="option.m.enabled" value="0"/>
|
||||
<property category="win32.*.win32b.ilink32" name="option.map_segments.enabled" value="0"/>
|
||||
<property category="win32.*.win32b.ilink32" name="option.outputdir.arg.1" value="..\..\debug\bin"/>
|
||||
<property category="win32.*.win32b.ilink32" name="option.outputdir.arg.merge" value="0"/>
|
||||
<property category="win32.*.win32b.ilink32" name="option.outputdir.enabled" value="1"/>
|
||||
<property category="win32.*.win32b.ilink32" name="option.s.enabled" value="0"/>
|
||||
<property category="win32.*.win32b.ilink32" name="option.w.enabled" value="0"/>
|
||||
<property category="win32.*.win32b.ilink32" name="param.libfiles.1" value="import32.lib"/>
|
||||
<property category="win32.*.win32b.ilink32" name="param.libfiles.2" value="cw32mti.lib"/>
|
||||
<property category="win32.*.win32b.ilink32" name="param.libfiles.3" value="aseawk.lib"/>
|
||||
<property category="win32.*.win32b.ilink32" name="param.libfiles.4" value="aseawk++.lib"/>
|
||||
<property category="win32.*.win32b.ilink32" name="param.libfiles.5" value="aseutl.lib"/>
|
||||
<property category="win32.*.win32b.ilink32" name="param.libfiles.6" value="aseutl.lib"/>
|
||||
<property category="win32.*.win32b.ilink32" name="param.libfiles.7" value="asecmn.lib"/>
|
||||
<property category="win32.*.win32b.ilink32" name="param.libfiles.merge" value="1"/>
|
||||
<property category="win32.*.win32b.ilink32" name="param.objfiles.1" value="c0x32w.obj"/>
|
||||
<property category="win32.*.win32b.ilink32" name="param.objfiles.2" value="$(PACKAGES)"/>
|
||||
<property category="win32.*.win32b.ilink32" name="param.objfiles.merge" value="1"/>
|
||||
</optionset>
|
||||
</project>
|
||||
<FILELIST>
|
||||
<FILE FILENAME="Awk.cpp" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="Awk" FORMNAME="" DESIGNCLASS=""/>
|
||||
</FILELIST>
|
||||
<IDEOPTIONS>
|
||||
<VersionInfo>
|
||||
<VersionInfo Name="IncludeVerInfo">False</VersionInfo>
|
||||
<VersionInfo Name="AutoIncBuild">False</VersionInfo>
|
||||
<VersionInfo Name="MajorVer">1</VersionInfo>
|
||||
<VersionInfo Name="MinorVer">0</VersionInfo>
|
||||
<VersionInfo Name="Release">0</VersionInfo>
|
||||
<VersionInfo Name="Build">0</VersionInfo>
|
||||
<VersionInfo Name="Debug">False</VersionInfo>
|
||||
<VersionInfo Name="PreRelease">False</VersionInfo>
|
||||
<VersionInfo Name="Special">False</VersionInfo>
|
||||
<VersionInfo Name="Private">False</VersionInfo>
|
||||
<VersionInfo Name="DLL">False</VersionInfo>
|
||||
<VersionInfo Name="Locale">1033</VersionInfo>
|
||||
<VersionInfo Name="CodePage">1252</VersionInfo>
|
||||
</VersionInfo>
|
||||
<VersionInfoKeys>
|
||||
<VersionInfoKeys Name="CompanyName"></VersionInfoKeys>
|
||||
<VersionInfoKeys Name="FileDescription"></VersionInfoKeys>
|
||||
<VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys>
|
||||
<VersionInfoKeys Name="InternalName"></VersionInfoKeys>
|
||||
<VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys>
|
||||
<VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys>
|
||||
<VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys>
|
||||
<VersionInfoKeys Name="ProductName"></VersionInfoKeys>
|
||||
<VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys>
|
||||
<VersionInfoKeys Name="Comments"></VersionInfoKeys>
|
||||
</VersionInfoKeys>
|
||||
<Debugging>
|
||||
<Debugging Name="DebugSourceDirs"></Debugging>
|
||||
</Debugging>
|
||||
<Parameters>
|
||||
<Parameters Name="RunParams">arg.awk ""</Parameters>
|
||||
<Parameters Name="Launcher"></Parameters>
|
||||
<Parameters Name="UseLauncher">True</Parameters>
|
||||
<Parameters Name="DebugCWD">C:\projects\ase\cmd\awk</Parameters>
|
||||
<Parameters Name="HostApplication"></Parameters>
|
||||
<Parameters Name="RemoteHost"></Parameters>
|
||||
<Parameters Name="RemotePath"></Parameters>
|
||||
<Parameters Name="RemoteParams"></Parameters>
|
||||
<Parameters Name="RemoteLauncher"></Parameters>
|
||||
<Parameters Name="UseRemoteLauncher">False</Parameters>
|
||||
<Parameters Name="RemoteCWD"></Parameters>
|
||||
<Parameters Name="RemoteDebug">False</Parameters>
|
||||
<Parameters Name="Debug Symbols Search Path"></Parameters>
|
||||
<Parameters Name="LoadAllSymbols">True</Parameters>
|
||||
<Parameters Name="LoadUnspecifiedSymbols">False</Parameters>
|
||||
</Parameters>
|
||||
<Excluded_Packages>
|
||||
<Excluded_Packages Name="c:\program files\borland\bds\4.0\Bin\dclib100.bpl">Borland InterBase Express Components</Excluded_Packages>
|
||||
<Excluded_Packages Name="c:\program files\borland\bds\4.0\Bin\dclIntraweb_80_100.bpl">Intraweb 8.0 Design Package for Borland Development Studio 2006</Excluded_Packages>
|
||||
<Excluded_Packages Name="c:\program files\borland\bds\4.0\Bin\dclindy100.bpl">Internet Direct Version 9 (Indy) Property and Component Editors</Excluded_Packages>
|
||||
<Excluded_Packages Name="c:\program files\borland\bds\4.0\Bin\bcbofficexp100.bpl">Borland C++Builder Office XP Servers Package</Excluded_Packages>
|
||||
<Excluded_Packages Name="c:\program files\borland\bds\4.0\Bin\dclbcbsmp100.bpl">Borland Sample Controls Design Time Package</Excluded_Packages>
|
||||
<Excluded_Packages Name="c:\program files\borland\bds\4.0\Bin\bcbie100.bpl">Borland C++Builder Internet Explorer 5 Components Package</Excluded_Packages>
|
||||
<Excluded_Packages Name="c:\program files\borland\bds\4.0\Bin\dcltee100.bpl">TeeChart Components</Excluded_Packages>
|
||||
</Excluded_Packages>
|
||||
<Linker>
|
||||
<Linker Name="LibPrefix"></Linker>
|
||||
<Linker Name="LibSuffix"></Linker>
|
||||
<Linker Name="LibVersion"></Linker>
|
||||
</Linker>
|
||||
</IDEOPTIONS>
|
||||
</BCBPROJECT>
|
||||
<buildevents>
|
||||
<buildevent file="aseawk++.bdsproj">
|
||||
<precompile mode="0" cancancel="0" capture="-1" showconsole="0">mkdir $(PROJECTDIR)..\release\bin
|
||||
mkdir $(PROJECTDIR)..\debug\bin
|
||||
</precompile>
|
||||
</buildevent>
|
||||
</buildevents>
|
||||
</CPlusPlusBuilder.Personality>
|
||||
</BorlandProject>
|
440
qse/cmd/awk/aseawk++.vcproj
Normal file
440
qse/cmd/awk/aseawk++.vcproj
Normal file
@ -0,0 +1,440 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="8.00"
|
||||
Name="aseawk++"
|
||||
ProjectGUID="{3BEA6CFE-C158-4BFB-B5FB-ED85251E3F98}"
|
||||
RootNamespace="aseawk++"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
<Platform
|
||||
Name="x64"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)\bin"
|
||||
IntermediateDirectory="$(ConfigurationName)\cpp"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
CharacterSet="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
TypeLibraryName=".\../../release/bin/aseawk++.tlb"
|
||||
HeaderFileName=""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
InlineFunctionExpansion="1"
|
||||
AdditionalIncludeDirectories="..\..\.."
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
|
||||
StringPooling="true"
|
||||
RuntimeLibrary="0"
|
||||
EnableFunctionLevelLinking="true"
|
||||
PrecompiledHeaderFile=".\release\cpp\aseawk++.pch"
|
||||
AssemblerListingLocation=""
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="true"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
Culture="1033"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="asecmn.lib aseawk.lib aseawk++.lib aseutl.lib"
|
||||
OutputFile="..\..\release\bin\aseawk++.exe"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="true"
|
||||
AdditionalLibraryDirectories="..\..\release\lib"
|
||||
SubSystem="1"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
SuppressStartupBanner="true"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|x64"
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)\bin"
|
||||
IntermediateDirectory="$(ConfigurationName)\cpp"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
CharacterSet="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
TargetEnvironment="3"
|
||||
TypeLibraryName=".\../../release/bin/aseawk++.tlb"
|
||||
HeaderFileName=""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
InlineFunctionExpansion="1"
|
||||
AdditionalIncludeDirectories="..\..\.."
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
|
||||
StringPooling="true"
|
||||
RuntimeLibrary="0"
|
||||
EnableFunctionLevelLinking="true"
|
||||
PrecompiledHeaderFile=".\release\cpp\aseawk++.pch"
|
||||
AssemblerListingLocation=""
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="true"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
Culture="1033"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="asecmn.lib aseawk.lib aseawk++.lib aseutl.lib"
|
||||
OutputFile="..\..\release\bin\aseawk++.exe"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="true"
|
||||
AdditionalLibraryDirectories="..\..\release\lib"
|
||||
SubSystem="1"
|
||||
TargetMachine="17"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
SuppressStartupBanner="true"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)\bin"
|
||||
IntermediateDirectory="$(ConfigurationName)\cpp"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
CharacterSet="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
TypeLibraryName=".\../../debug/bin/aseawk++.tlb"
|
||||
HeaderFileName=""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\.."
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
PrecompiledHeaderFile=".\debug\cpp\aseawk++.pch"
|
||||
AssemblerListingLocation=""
|
||||
BrowseInformation="1"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="true"
|
||||
DebugInformationFormat="4"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
Culture="1033"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="asecmn.lib aseawk.lib aseawk++.lib aseutl.lib"
|
||||
OutputFile="..\..\debug\bin\aseawk++.exe"
|
||||
LinkIncremental="2"
|
||||
SuppressStartupBanner="true"
|
||||
AdditionalLibraryDirectories="..\..\debug\lib"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
SuppressStartupBanner="true"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Debug|x64"
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)\bin"
|
||||
IntermediateDirectory="$(ConfigurationName)\cpp"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
CharacterSet="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
TargetEnvironment="3"
|
||||
TypeLibraryName=".\../../debug/bin/aseawk++.tlb"
|
||||
HeaderFileName=""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\.."
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
PrecompiledHeaderFile=".\debug\cpp\aseawk++.pch"
|
||||
AssemblerListingLocation=""
|
||||
BrowseInformation="1"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="true"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
Culture="1033"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="asecmn.lib aseawk.lib aseawk++.lib aseutl.lib"
|
||||
OutputFile="..\..\debug\bin\aseawk++.exe"
|
||||
LinkIncremental="2"
|
||||
SuppressStartupBanner="true"
|
||||
AdditionalLibraryDirectories="..\..\debug\lib"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
TargetMachine="17"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
SuppressStartupBanner="true"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||
>
|
||||
<File
|
||||
RelativePath="Awk.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|x64"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|x64"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl"
|
||||
>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Files"
|
||||
Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
|
||||
>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
262
qse/cmd/awk/aseawk.bdsproj
Normal file
262
qse/cmd/awk/aseawk.bdsproj
Normal file
@ -0,0 +1,262 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<BorlandProject>
|
||||
<PersonalityInfo>
|
||||
<Option>
|
||||
<Option Name="Personality">CPlusPlusBuilder.Personality</Option>
|
||||
<Option Name="ProjectType">Application</Option>
|
||||
<Option Name="Version">1.0</Option>
|
||||
<Option Name="GUID">{F0848980-053C-44B1-B7A0-4C834C1EB585}</Option>
|
||||
</Option>
|
||||
</PersonalityInfo>
|
||||
<CPlusPlusBuilder.Personality>
|
||||
<Source>
|
||||
<Source Name="MainSource">awk.c</Source>
|
||||
</Source>
|
||||
<BCBPROJECT>
|
||||
<project version="10.0">
|
||||
<property category="build.config" name="active" value="0"/>
|
||||
<property category="build.config" name="count" value="1"/>
|
||||
<property category="build.config" name="excludedefaultforzero" value="0"/>
|
||||
<property category="build.config.0" name="builddir" value="Debug"/>
|
||||
<property category="build.config.0" name="key" value="Debug_Build"/>
|
||||
<property category="build.config.0" name="name" value="Debug Build"/>
|
||||
<property category="build.config.0" name="settings.win32b" value="default"/>
|
||||
<property category="build.config.0" name="type" value="Toolset"/>
|
||||
<property category="build.config.0" name="win32.win32b.builddir" value="debug"/>
|
||||
<property category="build.config.1" name="key" value="Release_Build"/>
|
||||
<property category="build.config.1" name="name" value="Release Build"/>
|
||||
<property category="build.config.1" name="settings.win32b" value="default"/>
|
||||
<property category="build.config.1" name="type" value="Toolset"/>
|
||||
<property category="build.config.1" name="win32.win32b.builddir" value="release"/>
|
||||
<property category="build.node" name="lastconfig" value="Debug_Build"/>
|
||||
<property category="build.node" name="name" value="aseawk.exe"/>
|
||||
<property category="build.node" name="packages" value="vclx;vcl;rtl;dbrtl;vcldb;adortl;dbxcds;dbexpress;xmlrtl;vclie;inet;inetdbbde;inetdbxpress;soaprtl;dsnap;bdertl;vcldbx"/>
|
||||
<property category="build.node" name="use_packages" value="0"/>
|
||||
<property category="build.platform" name="active" value="win32"/>
|
||||
<property category="build.platform" name="win32.Debug_Build.toolset" value="win32b"/>
|
||||
<property category="build.platform" name="win32.Release_Build.toolset" value="win32b"/>
|
||||
<property category="build.platform" name="win32.default" value="win32b"/>
|
||||
<property category="build.platform" name="win32.enabled" value="1"/>
|
||||
<property category="build.platform" name="win32.win32b.enabled" value="1"/>
|
||||
<property category="win32.*.win32b.dcc32" name="param.filenames.merge" value="1"/>
|
||||
<property category="win32.*.win32b.tasm32" name="param.listfile.merge" value="1"/>
|
||||
<property category="win32.*.win32b.tasm32" name="param.objfile.merge" value="1"/>
|
||||
<property category="win32.*.win32b.tasm32" name="param.xreffile.merge" value="1"/>
|
||||
<property category="win32.Debug_Build.win32b.bcc32" name="option.D.arg.1" value="_DEBUG"/>
|
||||
<property category="win32.Debug_Build.win32b.bcc32" name="option.D.arg.merge" value="1"/>
|
||||
<property category="win32.Debug_Build.win32b.bcc32" name="option.D.enabled" value="1"/>
|
||||
<property category="win32.Debug_Build.win32b.bcc32" name="option.Od.enabled" value="1"/>
|
||||
<property category="win32.Debug_Build.win32b.bcc32" name="option.k.enabled" value="1"/>
|
||||
<property category="win32.Debug_Build.win32b.bcc32" name="option.n.arg.1" value="debug"/>
|
||||
<property category="win32.Debug_Build.win32b.bcc32" name="option.n.arg.merge" value="0"/>
|
||||
<property category="win32.Debug_Build.win32b.bcc32" name="option.n.enabled" value="1"/>
|
||||
<property category="win32.Debug_Build.win32b.bcc32" name="option.r.enabled" value="0"/>
|
||||
<property category="win32.Debug_Build.win32b.bcc32" name="option.v.enabled" value="1"/>
|
||||
<property category="win32.Debug_Build.win32b.bcc32" name="option.vG.enabled" value="0"/>
|
||||
<property category="win32.Debug_Build.win32b.bcc32" name="option.vG0.enabled" value="0"/>
|
||||
<property category="win32.Debug_Build.win32b.bcc32" name="option.vG2.enabled" value="0"/>
|
||||
<property category="win32.Debug_Build.win32b.bcc32" name="option.vG3.enabled" value="0"/>
|
||||
<property category="win32.Debug_Build.win32b.bcc32" name="option.vi.enabled" value="0"/>
|
||||
<property category="win32.Debug_Build.win32b.bcc32" name="option.y.enabled" value="1"/>
|
||||
<property category="win32.Debug_Build.win32b.dcc32" name="option.$D.enabled" value="1"/>
|
||||
<property category="win32.Debug_Build.win32b.dcc32" name="option.$O.enabled" value="0"/>
|
||||
<property category="win32.Debug_Build.win32b.dcc32" name="option.D.arg.1" value="DEBUG"/>
|
||||
<property category="win32.Debug_Build.win32b.dcc32" name="option.D.arg.merge" value="1"/>
|
||||
<property category="win32.Debug_Build.win32b.dcc32" name="option.D.enabled" value="1"/>
|
||||
<property category="win32.Debug_Build.win32b.dcc32" name="option.V.enabled" value="1"/>
|
||||
<property category="win32.Debug_Build.win32b.ilink32" name="option.L.arg.1" value="..\..\debug\lib"/>
|
||||
<property category="win32.Debug_Build.win32b.ilink32" name="option.L.arg.2" value="$(BDS)\lib\debug"/>
|
||||
<property category="win32.Debug_Build.win32b.ilink32" name="option.L.arg.merge" value="1"/>
|
||||
<property category="win32.Debug_Build.win32b.ilink32" name="option.L.enabled" value="1"/>
|
||||
<property category="win32.Debug_Build.win32b.tasm32" name="option.z.enabled" value="1"/>
|
||||
<property category="win32.Debug_Build.win32b.tasm32" name="option.zd.enabled" value="0"/>
|
||||
<property category="win32.Debug_Build.win32b.tasm32" name="option.zi.enabled" value="1"/>
|
||||
<property category="win32.Release_Build.win32b.bcc32" name="container.SelectedOptimizations.containerenabled" value="0"/>
|
||||
<property category="win32.Release_Build.win32b.bcc32" name="container.SelectedWarnings.containerenabled" value="1"/>
|
||||
<property category="win32.Release_Build.win32b.bcc32" name="option.D.arg.1" value="NDEBUG"/>
|
||||
<property category="win32.Release_Build.win32b.bcc32" name="option.D.arg.merge" value="1"/>
|
||||
<property category="win32.Release_Build.win32b.bcc32" name="option.D.enabled" value="1"/>
|
||||
<property category="win32.Release_Build.win32b.bcc32" name="option.O1.enabled" value="0"/>
|
||||
<property category="win32.Release_Build.win32b.bcc32" name="option.O2.enabled" value="1"/>
|
||||
<property category="win32.Release_Build.win32b.bcc32" name="option.Od.enabled" value="0"/>
|
||||
<property category="win32.Release_Build.win32b.bcc32" name="option.disablewarns.enabled" value="0"/>
|
||||
<property category="win32.Release_Build.win32b.bcc32" name="option.k.enabled" value="0"/>
|
||||
<property category="win32.Release_Build.win32b.bcc32" name="option.n.arg.1" value="release"/>
|
||||
<property category="win32.Release_Build.win32b.bcc32" name="option.n.arg.merge" value="0"/>
|
||||
<property category="win32.Release_Build.win32b.bcc32" name="option.n.enabled" value="1"/>
|
||||
<property category="win32.Release_Build.win32b.bcc32" name="option.r.enabled" value="1"/>
|
||||
<property category="win32.Release_Build.win32b.bcc32" name="option.vi.enabled" value="1"/>
|
||||
<property category="win32.Release_Build.win32b.bcc32" name="option.w.enabled" value="0"/>
|
||||
<property category="win32.Release_Build.win32b.dcc32" name="option.$D.enabled" value="0"/>
|
||||
<property category="win32.Release_Build.win32b.dcc32" name="option.$O.enabled" value="1"/>
|
||||
<property category="win32.Release_Build.win32b.dcc32" name="option.V.enabled" value="0"/>
|
||||
<property category="win32.Release_Build.win32b.ilink32" name="container.SelectedWarnings.containerenabled" value="1"/>
|
||||
<property category="win32.Release_Build.win32b.ilink32" name="option.L.arg.1" value="..\..\release\lib"/>
|
||||
<property category="win32.Release_Build.win32b.ilink32" name="option.L.arg.2" value="$(BDS)\lib\release"/>
|
||||
<property category="win32.Release_Build.win32b.ilink32" name="option.L.arg.merge" value="1"/>
|
||||
<property category="win32.Release_Build.win32b.ilink32" name="option.L.enabled" value="1"/>
|
||||
<property category="win32.Release_Build.win32b.ilink32" name="option.outputdir.arg.1" value="..\..\release\bin"/>
|
||||
<property category="win32.Release_Build.win32b.ilink32" name="option.outputdir.arg.merge" value="0"/>
|
||||
<property category="win32.Release_Build.win32b.ilink32" name="option.outputdir.enabled" value="1"/>
|
||||
<property category="win32.Release_Build.win32b.tasm32" name="option.z.enabled" value="0"/>
|
||||
<property category="win32.Release_Build.win32b.tasm32" name="option.zd.enabled" value="0"/>
|
||||
<property category="win32.Release_Build.win32b.tasm32" name="option.zi.enabled" value="0"/>
|
||||
<property category="win32.Release_Build.win32b.tasm32" name="option.zn.enabled" value="1"/>
|
||||
<optionset name="all_configurations">
|
||||
<property category="node" name="displayname" value="All Configurations"/>
|
||||
<property category="win32.*.win32b.bcc32" name="option.H=.arg.1" value="$(BDS)\lib\vcl100.csm"/>
|
||||
<property category="win32.*.win32b.bcc32" name="option.H=.arg.merge" value="1"/>
|
||||
<property category="win32.*.win32b.bcc32" name="option.H=.enabled" value="1"/>
|
||||
<property category="win32.*.win32b.bcc32" name="option.Hc.enabled" value="1"/>
|
||||
<property category="win32.*.win32b.bcc32" name="option.I.arg.1" value="..\..\.."/>
|
||||
<property category="win32.*.win32b.bcc32" name="option.I.arg.2" value="$(BDS)\include"/>
|
||||
<property category="win32.*.win32b.bcc32" name="option.I.arg.3" value="$(BDS)\include\dinkumware"/>
|
||||
<property category="win32.*.win32b.bcc32" name="option.I.arg.4" value="$(BDS)\include\vcl"/>
|
||||
<property category="win32.*.win32b.bcc32" name="option.I.arg.merge" value="1"/>
|
||||
<property category="win32.*.win32b.bcc32" name="option.I.enabled" value="1"/>
|
||||
<property category="win32.*.win32b.bcc32" name="option.Ve.enabled" value="0"/>
|
||||
<property category="win32.*.win32b.bcc32" name="option.additional_switches.arg" value=""/>
|
||||
<property category="win32.*.win32b.bcc32" name="option.additional_switches.arg.merge" value="1"/>
|
||||
<property category="win32.*.win32b.bcc32" name="option.additional_switches.enabled" value="0"/>
|
||||
<property category="win32.*.win32b.bcc32" name="option.b.enabled" value="0"/>
|
||||
<property category="win32.*.win32b.bcc32" name="option.sysdefines.arg.1" value="_RTLDLL"/>
|
||||
<property category="win32.*.win32b.bcc32" name="option.sysdefines.arg.2" value="NO_STRICT"/>
|
||||
<property category="win32.*.win32b.bcc32" name="option.sysdefines.arg.3" value="_NO_VCL"/>
|
||||
<property category="win32.*.win32b.bcc32" name="option.sysdefines.arg.merge" value="1"/>
|
||||
<property category="win32.*.win32b.bcc32" name="option.sysdefines.enabled" value="1"/>
|
||||
<property category="win32.*.win32b.bcc32" name="option.tW.enabled" value="0"/>
|
||||
<property category="win32.*.win32b.bcc32" name="option.tWC.enabled" value="1"/>
|
||||
<property category="win32.*.win32b.bcc32" name="option.tWD.enabled" value="0"/>
|
||||
<property category="win32.*.win32b.bcc32" name="option.tWM.enabled" value="1"/>
|
||||
<property category="win32.*.win32b.dcc32" name="option.I.arg.1" value="C:\projects\ase\test\awk"/>
|
||||
<property category="win32.*.win32b.dcc32" name="option.I.arg.merge" value="1"/>
|
||||
<property category="win32.*.win32b.dcc32" name="option.I.enabled" value="0"/>
|
||||
<property category="win32.*.win32b.dcc32" name="option.O.arg.1" value="C:\projects\ase\test\awk"/>
|
||||
<property category="win32.*.win32b.dcc32" name="option.O.arg.merge" value="1"/>
|
||||
<property category="win32.*.win32b.dcc32" name="option.O.enabled" value="0"/>
|
||||
<property category="win32.*.win32b.dcc32" name="option.R.arg.1" value="C:\projects\ase\test\awk"/>
|
||||
<property category="win32.*.win32b.dcc32" name="option.R.arg.merge" value="1"/>
|
||||
<property category="win32.*.win32b.dcc32" name="option.R.enabled" value="0"/>
|
||||
<property category="win32.*.win32b.dcc32" name="option.U.arg.1" value="C:\projects\ase\test\awk"/>
|
||||
<property category="win32.*.win32b.dcc32" name="option.U.arg.2" value="C:\Documents and Settings\root\My Documents\Borland Studio Projects"/>
|
||||
<property category="win32.*.win32b.dcc32" name="option.U.arg.3" value="$(BDS)\lib"/>
|
||||
<property category="win32.*.win32b.dcc32" name="option.U.arg.4" value="$(BDS)\lib\obj"/>
|
||||
<property category="win32.*.win32b.dcc32" name="option.U.arg.merge" value="1"/>
|
||||
<property category="win32.*.win32b.dcc32" name="option.U.enabled" value="1"/>
|
||||
<property category="win32.*.win32b.dcc32" name="param.filenames.merge" value="1"/>
|
||||
<property category="win32.*.win32b.idl2cpp" name="option.I.arg.1" value="C:\projects\ase\test\awk"/>
|
||||
<property category="win32.*.win32b.idl2cpp" name="option.I.arg.merge" value="1"/>
|
||||
<property category="win32.*.win32b.idl2cpp" name="option.I.enabled" value="1"/>
|
||||
<property category="win32.*.win32b.ilink32" name="container.SelectedWarnings.containerenabled" value="1"/>
|
||||
<property category="win32.*.win32b.ilink32" name="option.-w-.enabled" value="0"/>
|
||||
<property category="win32.*.win32b.ilink32" name="option.Gi.enabled" value="0"/>
|
||||
<property category="win32.*.win32b.ilink32" name="option.Gpd.enabled" value="0"/>
|
||||
<property category="win32.*.win32b.ilink32" name="option.Gpr.enabled" value="0"/>
|
||||
<property category="win32.*.win32b.ilink32" name="option.L.arg.1" value="$(BDS)\lib"/>
|
||||
<property category="win32.*.win32b.ilink32" name="option.L.arg.2" value="$(BDS)\lib\obj"/>
|
||||
<property category="win32.*.win32b.ilink32" name="option.L.arg.3" value="$(BDS)\lib\psdk"/>
|
||||
<property category="win32.*.win32b.ilink32" name="option.L.arg.merge" value="1"/>
|
||||
<property category="win32.*.win32b.ilink32" name="option.L.enabled" value="1"/>
|
||||
<property category="win32.*.win32b.ilink32" name="option.Tpd.enabled" value="0"/>
|
||||
<property category="win32.*.win32b.ilink32" name="option.Tpe.enabled" value="1"/>
|
||||
<property category="win32.*.win32b.ilink32" name="option.Tpp.enabled" value="0"/>
|
||||
<property category="win32.*.win32b.ilink32" name="option.aa.enabled" value="0"/>
|
||||
<property category="win32.*.win32b.ilink32" name="option.ap.enabled" value="1"/>
|
||||
<property category="win32.*.win32b.ilink32" name="option.dynamicrtl.enabled" value="0"/>
|
||||
<property category="win32.*.win32b.ilink32" name="option.j.arg.1" value="C:\projects\ase\test\awk"/>
|
||||
<property category="win32.*.win32b.ilink32" name="option.j.arg.merge" value="1"/>
|
||||
<property category="win32.*.win32b.ilink32" name="option.j.enabled" value="0"/>
|
||||
<property category="win32.*.win32b.ilink32" name="option.m.enabled" value="0"/>
|
||||
<property category="win32.*.win32b.ilink32" name="option.map_segments.enabled" value="0"/>
|
||||
<property category="win32.*.win32b.ilink32" name="option.outputdir.arg.1" value="..\..\debug\bin"/>
|
||||
<property category="win32.*.win32b.ilink32" name="option.outputdir.arg.merge" value="0"/>
|
||||
<property category="win32.*.win32b.ilink32" name="option.outputdir.enabled" value="1"/>
|
||||
<property category="win32.*.win32b.ilink32" name="option.s.enabled" value="0"/>
|
||||
<property category="win32.*.win32b.ilink32" name="option.w.enabled" value="0"/>
|
||||
<property category="win32.*.win32b.ilink32" name="param.libfiles.1" value="import32.lib"/>
|
||||
<property category="win32.*.win32b.ilink32" name="param.libfiles.2" value="cw32mti.lib"/>
|
||||
<property category="win32.*.win32b.ilink32" name="param.libfiles.3" value="aseawk.lib"/>
|
||||
<property category="win32.*.win32b.ilink32" name="param.libfiles.4" value="aseutl.lib"/>
|
||||
<property category="win32.*.win32b.ilink32" name="param.libfiles.5" value="asecmn.lib"/>
|
||||
<property category="win32.*.win32b.ilink32" name="param.libfiles.merge" value="1"/>
|
||||
<property category="win32.*.win32b.ilink32" name="param.objfiles.1" value="c0x32w.obj"/>
|
||||
<property category="win32.*.win32b.ilink32" name="param.objfiles.2" value="$(PACKAGES)"/>
|
||||
<property category="win32.*.win32b.ilink32" name="param.objfiles.merge" value="1"/>
|
||||
</optionset>
|
||||
</project>
|
||||
<FILELIST>
|
||||
<FILE FILENAME="awk.c" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="awk" FORMNAME="" DESIGNCLASS=""/>
|
||||
</FILELIST>
|
||||
<IDEOPTIONS>
|
||||
<VersionInfo>
|
||||
<VersionInfo Name="IncludeVerInfo">False</VersionInfo>
|
||||
<VersionInfo Name="AutoIncBuild">False</VersionInfo>
|
||||
<VersionInfo Name="MajorVer">1</VersionInfo>
|
||||
<VersionInfo Name="MinorVer">0</VersionInfo>
|
||||
<VersionInfo Name="Release">0</VersionInfo>
|
||||
<VersionInfo Name="Build">0</VersionInfo>
|
||||
<VersionInfo Name="Debug">False</VersionInfo>
|
||||
<VersionInfo Name="PreRelease">False</VersionInfo>
|
||||
<VersionInfo Name="Special">False</VersionInfo>
|
||||
<VersionInfo Name="Private">False</VersionInfo>
|
||||
<VersionInfo Name="DLL">False</VersionInfo>
|
||||
<VersionInfo Name="Locale">1033</VersionInfo>
|
||||
<VersionInfo Name="CodePage">1252</VersionInfo>
|
||||
</VersionInfo>
|
||||
<VersionInfoKeys>
|
||||
<VersionInfoKeys Name="CompanyName"></VersionInfoKeys>
|
||||
<VersionInfoKeys Name="FileDescription"></VersionInfoKeys>
|
||||
<VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys>
|
||||
<VersionInfoKeys Name="InternalName"></VersionInfoKeys>
|
||||
<VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys>
|
||||
<VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys>
|
||||
<VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys>
|
||||
<VersionInfoKeys Name="ProductName"></VersionInfoKeys>
|
||||
<VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys>
|
||||
<VersionInfoKeys Name="Comments"></VersionInfoKeys>
|
||||
</VersionInfoKeys>
|
||||
<Debugging>
|
||||
<Debugging Name="DebugSourceDirs"></Debugging>
|
||||
</Debugging>
|
||||
<Parameters>
|
||||
<Parameters Name="RunParams">-f arg.awk ""</Parameters>
|
||||
<Parameters Name="Launcher"></Parameters>
|
||||
<Parameters Name="UseLauncher">True</Parameters>
|
||||
<Parameters Name="DebugCWD">C:\projects\ase\test\awk</Parameters>
|
||||
<Parameters Name="HostApplication"></Parameters>
|
||||
<Parameters Name="RemoteHost"></Parameters>
|
||||
<Parameters Name="RemotePath"></Parameters>
|
||||
<Parameters Name="RemoteParams"></Parameters>
|
||||
<Parameters Name="RemoteLauncher"></Parameters>
|
||||
<Parameters Name="UseRemoteLauncher">False</Parameters>
|
||||
<Parameters Name="RemoteCWD"></Parameters>
|
||||
<Parameters Name="RemoteDebug">False</Parameters>
|
||||
<Parameters Name="Debug Symbols Search Path"></Parameters>
|
||||
<Parameters Name="LoadAllSymbols">True</Parameters>
|
||||
<Parameters Name="LoadUnspecifiedSymbols">False</Parameters>
|
||||
</Parameters>
|
||||
<Excluded_Packages>
|
||||
<Excluded_Packages Name="c:\program files\borland\bds\4.0\Bin\dclib100.bpl">Borland InterBase Express Components</Excluded_Packages>
|
||||
<Excluded_Packages Name="c:\program files\borland\bds\4.0\Bin\dclIntraweb_80_100.bpl">Intraweb 8.0 Design Package for Borland Development Studio 2006</Excluded_Packages>
|
||||
<Excluded_Packages Name="c:\program files\borland\bds\4.0\Bin\dclindy100.bpl">Internet Direct Version 9 (Indy) Property and Component Editors</Excluded_Packages>
|
||||
<Excluded_Packages Name="c:\program files\borland\bds\4.0\Bin\bcbofficexp100.bpl">Borland C++Builder Office XP Servers Package</Excluded_Packages>
|
||||
<Excluded_Packages Name="c:\program files\borland\bds\4.0\Bin\dclbcbsmp100.bpl">Borland Sample Controls Design Time Package</Excluded_Packages>
|
||||
<Excluded_Packages Name="c:\program files\borland\bds\4.0\Bin\bcbie100.bpl">Borland C++Builder Internet Explorer 5 Components Package</Excluded_Packages>
|
||||
<Excluded_Packages Name="c:\program files\borland\bds\4.0\Bin\dcltee100.bpl">TeeChart Components</Excluded_Packages>
|
||||
</Excluded_Packages>
|
||||
<Linker>
|
||||
<Linker Name="LibPrefix"></Linker>
|
||||
<Linker Name="LibSuffix"></Linker>
|
||||
<Linker Name="LibVersion"></Linker>
|
||||
</Linker>
|
||||
</IDEOPTIONS>
|
||||
</BCBPROJECT>
|
||||
<buildevents>
|
||||
<buildevent file="aseawk.bdsproj">
|
||||
<precompile mode="0" cancancel="0" capture="-1" showconsole="0">mkdir $(PROJECTDIR)..\release\bin
|
||||
mkdir $(PROJECTDIR)..\debug\bin
|
||||
</precompile>
|
||||
</buildevent>
|
||||
</buildevents>
|
||||
</CPlusPlusBuilder.Personality>
|
||||
</BorlandProject>
|
395
qse/cmd/awk/aseawk.vcproj
Normal file
395
qse/cmd/awk/aseawk.vcproj
Normal file
@ -0,0 +1,395 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="8.00"
|
||||
Name="aseawk"
|
||||
ProjectGUID="{57F1E1D0-28B6-42BF-BAFB-045AEE2DCF4F}"
|
||||
RootNamespace="aseawk"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
<Platform
|
||||
Name="x64"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)\bin"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
CharacterSet="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
TypeLibraryName=".\../../release/bin/aseawk.tlb"
|
||||
HeaderFileName=""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
InlineFunctionExpansion="1"
|
||||
AdditionalIncludeDirectories="..\..\.."
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
|
||||
StringPooling="true"
|
||||
RuntimeLibrary="0"
|
||||
EnableFunctionLevelLinking="true"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="true"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
Culture="1033"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="asecmn.lib aseawk.lib aseutl.lib"
|
||||
OutputFile="$(OutDir)\aseawk.exe"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="true"
|
||||
AdditionalLibraryDirectories="..\..\release\lib"
|
||||
SubSystem="1"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
SuppressStartupBanner="true"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|x64"
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)\bin"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
CharacterSet="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
TargetEnvironment="3"
|
||||
TypeLibraryName=".\../../release/bin/aseawk.tlb"
|
||||
HeaderFileName=""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
InlineFunctionExpansion="1"
|
||||
AdditionalIncludeDirectories="..\..\.."
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
|
||||
StringPooling="true"
|
||||
RuntimeLibrary="0"
|
||||
EnableFunctionLevelLinking="true"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="true"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
Culture="1033"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="asecmn.lib aseawk.lib aseutl.lib"
|
||||
OutputFile="$(OutDir)\aseawk.exe"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="true"
|
||||
AdditionalLibraryDirectories="..\..\release\lib"
|
||||
SubSystem="1"
|
||||
TargetMachine="17"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
SuppressStartupBanner="true"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)\bin"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
CharacterSet="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
TypeLibraryName=".\../../debug/bin/aseawk.tlb"
|
||||
HeaderFileName=""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\.."
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
BrowseInformation="1"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="true"
|
||||
DebugInformationFormat="4"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
Culture="1033"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="asecmn.lib aseawk.lib aseutl.lib"
|
||||
OutputFile="$(OutDir)\aseawk.exe"
|
||||
LinkIncremental="2"
|
||||
SuppressStartupBanner="true"
|
||||
AdditionalLibraryDirectories="..\..\debug\lib"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
SuppressStartupBanner="true"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Debug|x64"
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)\bin"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
CharacterSet="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
TargetEnvironment="3"
|
||||
TypeLibraryName=".\../../debug/bin/aseawk.tlb"
|
||||
HeaderFileName=""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\.."
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
BrowseInformation="1"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="true"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
Culture="1033"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="asecmn.lib aseawk.lib aseutl.lib"
|
||||
OutputFile="$(OutDir)\aseawk.exe"
|
||||
LinkIncremental="2"
|
||||
SuppressStartupBanner="true"
|
||||
AdditionalLibraryDirectories="..\..\debug\lib"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
TargetMachine="17"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
SuppressStartupBanner="true"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\awk.c"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl"
|
||||
>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Files"
|
||||
Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
|
||||
>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
102
qse/cmd/awk/asetestawk++.dsp
Normal file
102
qse/cmd/awk/asetestawk++.dsp
Normal file
@ -0,0 +1,102 @@
|
||||
# Microsoft Developer Studio Project File - Name="asetestawk++" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Console Application" 0x0103
|
||||
|
||||
CFG=asetestawk++ - Win32 Debug
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "asetestawk++.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "asetestawk++.mak" CFG="asetestawk++ - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "asetestawk++ - Win32 Release" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE "asetestawk++ - Win32 Debug" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "asetestawk++ - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "../../release/bin"
|
||||
# PROP Intermediate_Dir "release/cpp"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\.." /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_UNICODE" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
|
||||
# ADD LINK32 asecmn.lib aseawk.lib aseawk++.lib aseutl.lib user32.lib kernel32.lib /nologo /subsystem:console /machine:I386 /out:"../../release/bin/aseawk++.exe" /libpath:"../../release/lib"
|
||||
|
||||
!ELSEIF "$(CFG)" == "asetestawk++ - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "../../debug/bin"
|
||||
# PROP Intermediate_Dir "debug/cpp"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
|
||||
# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\..\.." /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_UNICODE" /FR /YX /FD /GZ /c
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 asecmn.lib aseawk.lib aseawk++.lib aseutl.lib user32.lib kernel32.lib /nologo /subsystem:console /debug /machine:I386 /out:"../../debug/bin/aseawk++.exe" /pdbtype:sept /libpath:"../../debug/lib"
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "asetestawk++ - Win32 Release"
|
||||
# Name "asetestawk++ - Win32 Debug"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Awk.cpp
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Header Files"
|
||||
|
||||
# PROP Default_Filter "h;hpp;hxx;hm;inl"
|
||||
# End Group
|
||||
# Begin Group "Resource Files"
|
||||
|
||||
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
|
||||
# End Group
|
||||
# End Target
|
||||
# End Project
|
102
qse/cmd/awk/asetestawk.dsp
Normal file
102
qse/cmd/awk/asetestawk.dsp
Normal file
@ -0,0 +1,102 @@
|
||||
# Microsoft Developer Studio Project File - Name="asetestawk" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Console Application" 0x0103
|
||||
|
||||
CFG=asetestawk - Win32 Debug
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "asetestawk.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "asetestawk.mak" CFG="asetestawk - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "asetestawk - Win32 Release" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE "asetestawk - Win32 Debug" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "asetestawk - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "../../release/bin"
|
||||
# PROP Intermediate_Dir "release"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\.." /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_UNICODE" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
|
||||
# ADD LINK32 asecmn.lib aseawk.lib aseutl.lib user32.lib kernel32.lib /nologo /subsystem:console /machine:I386 /out:"../../release/bin/aseawk.exe" /libpath:"../../release/lib"
|
||||
|
||||
!ELSEIF "$(CFG)" == "asetestawk - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "../../debug/bin"
|
||||
# PROP Intermediate_Dir "debug"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
|
||||
# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\..\.." /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_UNICODE" /FR /YX /FD /GZ /c
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 asecmn.lib aseawk.lib aseutl.lib user32.lib kernel32.lib /nologo /subsystem:console /debug /machine:I386 /out:"../../debug/bin/aseawk.exe" /pdbtype:sept /libpath:"../../debug/lib"
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "asetestawk - Win32 Release"
|
||||
# Name "asetestawk - Win32 Debug"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\awk.c
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Header Files"
|
||||
|
||||
# PROP Default_Filter "h;hpp;hxx;hm;inl"
|
||||
# End Group
|
||||
# Begin Group "Resource Files"
|
||||
|
||||
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
|
||||
# End Group
|
||||
# End Target
|
||||
# End Project
|
52
qse/cmd/awk/asm.awk
Normal file
52
qse/cmd/awk/asm.awk
Normal file
@ -0,0 +1,52 @@
|
||||
#
|
||||
# $Id: asm.awk,v 1.4 2007/09/27 11:33:45 bacon Exp $
|
||||
#
|
||||
# Taken from the book "The AWK Programming Language"
|
||||
# aseawk++ -si asm.awk -a asm.s -nostripspaces -baseone
|
||||
#
|
||||
|
||||
BEGIN {
|
||||
srcfile = ARGV[1];
|
||||
ARGV[1] = "";
|
||||
tempfile = "asm.temp";
|
||||
n = split("const get put ld st add sub jpos jz j halt", x);
|
||||
for (i = 1; i <= n; i++) op[x[i]] = i - 1;
|
||||
|
||||
# PASS 1
|
||||
FS = "[ \t]+";
|
||||
while (getline <srcfile > 0) {
|
||||
sub (/#.*/, "");
|
||||
symtab[$1] = nextmem;
|
||||
|
||||
if ($2 != "") {
|
||||
print $2 "\t" $3 >tempfile;
|
||||
nextmem++;
|
||||
}
|
||||
}
|
||||
close (tempfile);
|
||||
|
||||
# PASS 2
|
||||
nextmem = 0;
|
||||
while (getline <tempfile > 0) {
|
||||
if ($2 !~ /^[0-9]*$/) $2 = symtab[$2];
|
||||
mem[nextmem++] = 1000 * op[$1] + $2;
|
||||
}
|
||||
|
||||
# INTERPRETER
|
||||
for (pc = 0; pc >= 0; ) {
|
||||
addr = mem[pc] % 1000;
|
||||
code = int(mem[pc++] / 1000);
|
||||
if (code == op["get"]) { if (getline acc <= 0) acc = 0; }
|
||||
else if (code == op["put"]) { print acc; }
|
||||
else if (code == op["st"]) { mem[addr] = acc; }
|
||||
else if (code == op["ld"]) { acc = mem[addr]; }
|
||||
else if (code == op["add"]) { acc += mem[addr]; }
|
||||
else if (code == op["sub"]) { acc -= mem[addr]; }
|
||||
else if (code == op["jpos"]) { if (acc > 0) pc = addr; }
|
||||
else if (code == op["jz"]) { if (acc == 0) pc = addr; }
|
||||
else if (code == op["j"]) { pc = addr; }
|
||||
else if (code == op["halt"]) { pc = -1; }
|
||||
else { pc = -1; }
|
||||
}
|
||||
}
|
||||
|
14
qse/cmd/awk/asm.s
Normal file
14
qse/cmd/awk/asm.s
Normal file
@ -0,0 +1,14 @@
|
||||
ld zero # initialize sum to zero
|
||||
st sum
|
||||
loop get # read a number
|
||||
jz done # no more input if number is zero
|
||||
add sum # add in accumulated sum
|
||||
st sum # store new value back in sum
|
||||
j loop # go back and read another number
|
||||
|
||||
done ld sum # print sum
|
||||
put
|
||||
halt
|
||||
|
||||
zero const 0
|
||||
sum const
|
609
qse/cmd/awk/awk.c
Normal file
609
qse/cmd/awk/awk.c
Normal file
@ -0,0 +1,609 @@
|
||||
/*
|
||||
* $Id: awk.c 499 2008-12-16 09:42:48Z baconevi $
|
||||
*/
|
||||
|
||||
#include <ase/awk/awk.h>
|
||||
#include <ase/cmn/sll.h>
|
||||
#include <ase/cmn/mem.h>
|
||||
#include <ase/cmn/chr.h>
|
||||
#include <ase/cmn/opt.h>
|
||||
|
||||
#include <ase/utl/stdio.h>
|
||||
#include <ase/utl/main.h>
|
||||
|
||||
#include <string.h>
|
||||
#include <signal.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#define ABORT(label) goto label
|
||||
|
||||
#if defined(_WIN32)
|
||||
#include <windows.h>
|
||||
#include <tchar.h>
|
||||
#include <process.h>
|
||||
#pragma warning (disable: 4996)
|
||||
#pragma warning (disable: 4296)
|
||||
|
||||
#if defined(_MSC_VER) && defined(_DEBUG)
|
||||
#define _CRTDBG_MAP_ALLOC
|
||||
#include <crtdbg.h>
|
||||
#endif
|
||||
#else
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
static ase_awk_t* app_awk = NULL;
|
||||
static ase_awk_run_t* app_run = NULL;
|
||||
static int app_debug = 0;
|
||||
|
||||
static void dprint (const ase_char_t* fmt, ...)
|
||||
{
|
||||
if (app_debug)
|
||||
{
|
||||
va_list ap;
|
||||
va_start (ap, fmt);
|
||||
ase_vfprintf (stderr, fmt, ap);
|
||||
va_end (ap);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#ifdef _WIN32
|
||||
static BOOL WINAPI stop_run (DWORD ctrl_type)
|
||||
{
|
||||
if (ctrl_type == CTRL_C_EVENT ||
|
||||
ctrl_type == CTRL_CLOSE_EVENT)
|
||||
{
|
||||
ase_awk_stop (app_run);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
#else
|
||||
static void stop_run (int sig)
|
||||
{
|
||||
signal (SIGINT, SIG_IGN);
|
||||
ase_awk_stop (app_run);
|
||||
signal (SIGINT, stop_run);
|
||||
}
|
||||
#endif
|
||||
|
||||
static void on_run_start (ase_awk_run_t* run, void* custom)
|
||||
{
|
||||
app_run = run;
|
||||
dprint (ASE_T("[AWK ABOUT TO START]\n"));
|
||||
}
|
||||
|
||||
static ase_map_walk_t print_awk_value (
|
||||
ase_map_t* map, ase_map_pair_t* pair, void* arg)
|
||||
{
|
||||
ase_awk_run_t* run = (ase_awk_run_t*)arg;
|
||||
ase_char_t* str;
|
||||
ase_size_t len;
|
||||
|
||||
str = ase_awk_valtostr (run, ASE_MAP_VPTR(pair), 0, ASE_NULL, &len);
|
||||
if (str == ASE_NULL)
|
||||
{
|
||||
dprint (ASE_T("***OUT OF MEMORY***\n"));
|
||||
}
|
||||
else
|
||||
{
|
||||
dprint (ASE_T("%.*s = %.*s\n"),
|
||||
(int)ASE_MAP_KLEN(pair), ASE_MAP_KPTR(pair),
|
||||
(int)len, str);
|
||||
ase_awk_free (ase_awk_getrunawk(run), str);
|
||||
}
|
||||
|
||||
return ASE_MAP_WALK_FORWARD;
|
||||
}
|
||||
|
||||
static void on_run_statement (
|
||||
ase_awk_run_t* run, ase_size_t line, void* custom)
|
||||
{
|
||||
/*dprint (L"running %d\n", (int)line);*/
|
||||
}
|
||||
|
||||
static void on_run_return (
|
||||
ase_awk_run_t* run, ase_awk_val_t* ret, void* custom)
|
||||
{
|
||||
ase_size_t len;
|
||||
ase_char_t* str;
|
||||
|
||||
if (ret == ase_awk_val_nil)
|
||||
{
|
||||
dprint (ASE_T("[RETURN] - ***nil***\n"));
|
||||
}
|
||||
else
|
||||
{
|
||||
str = ase_awk_valtostr (run, ret, 0, ASE_NULL, &len);
|
||||
if (str == ASE_NULL)
|
||||
{
|
||||
dprint (ASE_T("[RETURN] - ***OUT OF MEMORY***\n"));
|
||||
}
|
||||
else
|
||||
{
|
||||
dprint (ASE_T("[RETURN] - [%.*s]\n"), (int)len, str);
|
||||
ase_awk_free (ase_awk_getrunawk(run), str);
|
||||
}
|
||||
}
|
||||
|
||||
dprint (ASE_T("[NAMED VARIABLES]\n"));
|
||||
ase_map_walk (ase_awk_getrunnvmap(run), print_awk_value, run);
|
||||
dprint (ASE_T("[END NAMED VARIABLES]\n"));
|
||||
}
|
||||
|
||||
static void on_run_end (ase_awk_run_t* run, int errnum, void* data)
|
||||
{
|
||||
if (errnum != ASE_AWK_ENOERR)
|
||||
{
|
||||
dprint (ASE_T("[AWK ENDED WITH AN ERROR]\n"));
|
||||
ase_printf (ASE_T("RUN ERROR: CODE [%d] LINE [%u] %s\n"),
|
||||
errnum,
|
||||
(unsigned int)ase_awk_getrunerrlin(run),
|
||||
ase_awk_getrunerrmsg(run));
|
||||
}
|
||||
else dprint (ASE_T("[AWK ENDED SUCCESSFULLY]\n"));
|
||||
|
||||
app_run = NULL;
|
||||
}
|
||||
|
||||
/* TODO: remove otab... */
|
||||
static struct
|
||||
{
|
||||
const ase_char_t* name;
|
||||
int opt;
|
||||
} otab[] =
|
||||
{
|
||||
{ ASE_T("implicit"), ASE_AWK_IMPLICIT },
|
||||
{ ASE_T("explicit"), ASE_AWK_EXPLICIT },
|
||||
{ ASE_T("bxor"), ASE_AWK_BXOR },
|
||||
{ ASE_T("shift"), ASE_AWK_SHIFT },
|
||||
{ ASE_T("idiv"), ASE_AWK_IDIV },
|
||||
{ ASE_T("extio"), ASE_AWK_EXTIO },
|
||||
{ ASE_T("newline"), ASE_AWK_NEWLINE },
|
||||
{ ASE_T("baseone"), ASE_AWK_BASEONE },
|
||||
{ ASE_T("stripspaces"), ASE_AWK_STRIPSPACES },
|
||||
{ ASE_T("nextofile"), ASE_AWK_NEXTOFILE },
|
||||
{ ASE_T("crfl"), ASE_AWK_CRLF },
|
||||
{ ASE_T("argstomain"), ASE_AWK_ARGSTOMAIN },
|
||||
{ ASE_T("reset"), ASE_AWK_RESET },
|
||||
{ ASE_T("maptovar"), ASE_AWK_MAPTOVAR },
|
||||
{ ASE_T("pablock"), ASE_AWK_PABLOCK }
|
||||
};
|
||||
|
||||
static void print_usage (const ase_char_t* argv0)
|
||||
{
|
||||
int j;
|
||||
|
||||
ase_printf (ASE_T("Usage: %s [options] -f sourcefile [ -- ] [datafile]*\n"), argv0);
|
||||
ase_printf (ASE_T(" %s [options] [ -- ] sourcestring [datafile]*\n"), argv0);
|
||||
ase_printf (ASE_T("Where options are:\n"));
|
||||
ase_printf (ASE_T(" -h print this message\n"));
|
||||
ase_printf (ASE_T(" -d show extra information\n"));
|
||||
ase_printf (ASE_T(" -f/--file sourcefile set the source script file\n"));
|
||||
ase_printf (ASE_T(" -o/--deparsed-file deparsedfile set the deparsing output file\n"));
|
||||
ase_printf (ASE_T(" -F/--field-separator string set a field separator(FS)\n"));
|
||||
|
||||
ase_printf (ASE_T("\nYou may specify the following options to change the behavior of the interpreter.\n"));
|
||||
for (j = 0; j < ASE_COUNTOF(otab); j++)
|
||||
{
|
||||
ase_printf (ASE_T(" -%-20s -no%-20s\n"), otab[j].name, otab[j].name);
|
||||
}
|
||||
}
|
||||
|
||||
static int bfn_sleep (
|
||||
ase_awk_run_t* run, const ase_char_t* fnm, ase_size_t fnl)
|
||||
{
|
||||
ase_size_t nargs;
|
||||
ase_awk_val_t* a0;
|
||||
ase_long_t lv;
|
||||
ase_real_t rv;
|
||||
ase_awk_val_t* r;
|
||||
int n;
|
||||
|
||||
nargs = ase_awk_getnargs (run);
|
||||
ASE_ASSERT (nargs == 1);
|
||||
|
||||
a0 = ase_awk_getarg (run, 0);
|
||||
|
||||
n = ase_awk_valtonum (run, a0, &lv, &rv);
|
||||
if (n == -1) return -1;
|
||||
if (n == 1) lv = (ase_long_t)rv;
|
||||
|
||||
#ifdef _WIN32
|
||||
Sleep ((DWORD)(lv * 1000));
|
||||
n = 0;
|
||||
#else
|
||||
n = sleep (lv);
|
||||
#endif
|
||||
|
||||
r = ase_awk_makeintval (run, n);
|
||||
if (r == ASE_NULL)
|
||||
{
|
||||
ase_awk_setrunerrnum (run, ASE_AWK_ENOMEM);
|
||||
return -1;
|
||||
}
|
||||
|
||||
ase_awk_setretval (run, r);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void out_of_memory (void)
|
||||
{
|
||||
ase_fprintf (ASE_STDERR, ASE_T("Error: out of memory\n"));
|
||||
}
|
||||
|
||||
struct argout_t
|
||||
{
|
||||
void* isp; /* input source files or string */
|
||||
int ist; /* input source type */
|
||||
ase_size_t isfl; /* the number of input source files */
|
||||
ase_char_t* osf; /* output source file */
|
||||
ase_char_t** icf; /* input console files */
|
||||
ase_size_t icfl; /* the number of input console files */
|
||||
ase_map_t* vm; /* global variable map */
|
||||
};
|
||||
|
||||
static int handle_args (int argc, ase_char_t* argv[], struct argout_t* ao)
|
||||
{
|
||||
static ase_opt_lng_t lng[] =
|
||||
{
|
||||
{ ASE_T("implicit"), 0 },
|
||||
{ ASE_T("explicit"), 0 },
|
||||
{ ASE_T("bxor"), 0 },
|
||||
{ ASE_T("shift"), 0 },
|
||||
{ ASE_T("idiv"), 0 },
|
||||
{ ASE_T("extio"), 0 },
|
||||
{ ASE_T("newline"), 0 },
|
||||
{ ASE_T("baseone"), 0 },
|
||||
{ ASE_T("stripspaces"), 0 },
|
||||
{ ASE_T("nextofile"), 0 },
|
||||
{ ASE_T("crlf"), 0 },
|
||||
{ ASE_T("argstomain"), 0 },
|
||||
{ ASE_T("reset"), 0 },
|
||||
{ ASE_T("maptovar"), 0 },
|
||||
{ ASE_T("pablock"), 0 },
|
||||
|
||||
{ ASE_T(":main"), ASE_T('m') },
|
||||
{ ASE_T(":file"), ASE_T('f') },
|
||||
{ ASE_T(":field-separator"), ASE_T('F') },
|
||||
{ ASE_T(":deparsed-file"), ASE_T('o') },
|
||||
{ ASE_T(":assign"), ASE_T('v') },
|
||||
|
||||
{ ASE_T("help"), ASE_T('h') }
|
||||
};
|
||||
|
||||
static ase_opt_t opt =
|
||||
{
|
||||
ASE_T("hdm:f:F:o:v:"),
|
||||
lng
|
||||
};
|
||||
|
||||
ase_cint_t c;
|
||||
|
||||
ase_size_t isfc = 16; /* the capacity of isf */
|
||||
ase_size_t isfl = 0; /* number of input source files */
|
||||
|
||||
ase_size_t icfc = 0; /* the capacity of icf */
|
||||
ase_size_t icfl = 0; /* the number of input console files */
|
||||
|
||||
ase_char_t** isf = ASE_NULL; /* input source files */
|
||||
ase_char_t* osf = ASE_NULL; /* output source file */
|
||||
ase_char_t** icf = ASE_NULL; /* input console files */
|
||||
|
||||
ase_map_t* vm = ASE_NULL; /* global variable map */
|
||||
|
||||
isf = (ase_char_t**) malloc (ASE_SIZEOF(*isf) * isfc);
|
||||
if (isf == ASE_NULL)
|
||||
{
|
||||
out_of_memory ();
|
||||
ABORT (oops);
|
||||
}
|
||||
|
||||
vm = ase_map_open (ASE_NULL, 0, 30, 70);
|
||||
if (vm == ASE_NULL)
|
||||
{
|
||||
out_of_memory ();
|
||||
ABORT (oops);
|
||||
}
|
||||
ase_map_setcopier (vm, ASE_MAP_KEY, ASE_MAP_COPIER_INLINE);
|
||||
ase_map_setcopier (vm, ASE_MAP_VAL, ASE_MAP_COPIER_INLINE);
|
||||
ase_map_setscale (vm, ASE_MAP_KEY, ASE_SIZEOF(ase_char_t));
|
||||
ase_map_setscale (vm, ASE_MAP_VAL, ASE_SIZEOF(ase_char_t));
|
||||
|
||||
while ((c = ase_getopt (argc, argv, &opt)) != ASE_CHAR_EOF)
|
||||
{
|
||||
switch (c)
|
||||
{
|
||||
case 0:
|
||||
ase_printf (ASE_T(">>> [%s] [%s]\n"), opt.lngopt, opt.arg);
|
||||
break;
|
||||
|
||||
case ASE_T('h'):
|
||||
print_usage (argv[0]);
|
||||
if (isf != ASE_NULL) free (isf);
|
||||
if (vm != ASE_NULL) ase_map_close (vm);
|
||||
return 1;
|
||||
|
||||
case ASE_T('d'):
|
||||
{
|
||||
app_debug = 1;
|
||||
break;
|
||||
}
|
||||
|
||||
case ASE_T('f'):
|
||||
{
|
||||
if (isfl >= isfc-1) /* -1 for last ASE_NULL */
|
||||
{
|
||||
ase_char_t** tmp;
|
||||
tmp = (ase_char_t**) realloc (isf, ASE_SIZEOF(*isf)*(isfc+16));
|
||||
if (tmp == ASE_NULL)
|
||||
{
|
||||
out_of_memory ();
|
||||
ABORT (oops);
|
||||
}
|
||||
|
||||
isf = tmp;
|
||||
isfc = isfc + 16;
|
||||
}
|
||||
|
||||
isf[isfl++] = opt.arg;
|
||||
break;
|
||||
}
|
||||
|
||||
case ASE_T('F'):
|
||||
{
|
||||
ase_printf (ASE_T("[field separator] = %s\n"), opt.arg);
|
||||
break;
|
||||
}
|
||||
|
||||
case ASE_T('o'):
|
||||
{
|
||||
osf = opt.arg;
|
||||
break;
|
||||
}
|
||||
|
||||
case ASE_T('v'):
|
||||
{
|
||||
ase_char_t* eq = ase_strchr(opt.arg, ASE_T('='));
|
||||
if (eq == ASE_NULL)
|
||||
{
|
||||
/* INVALID VALUE... */
|
||||
ABORT (oops);
|
||||
}
|
||||
|
||||
*eq = ASE_T('\0');
|
||||
|
||||
if (ase_map_upsert (vm, opt.arg, ase_strlen(opt.arg)+1, eq, ase_strlen(eq)+1) == ASE_NULL)
|
||||
{
|
||||
out_of_memory ();
|
||||
ABORT (oops);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case ASE_T('?'):
|
||||
{
|
||||
if (opt.lngopt)
|
||||
{
|
||||
ase_printf (ASE_T("Error: illegal option - %s\n"), opt.lngopt);
|
||||
}
|
||||
else
|
||||
{
|
||||
ase_printf (ASE_T("Error: illegal option - %c\n"), opt.opt);
|
||||
}
|
||||
|
||||
ABORT (oops);
|
||||
}
|
||||
|
||||
case ASE_T(':'):
|
||||
{
|
||||
if (opt.lngopt)
|
||||
{
|
||||
ase_printf (ASE_T("Error: bad argument for %s\n"), opt.lngopt);
|
||||
}
|
||||
else
|
||||
{
|
||||
ase_printf (ASE_T("Error: bad argument for %c\n"), opt.opt);
|
||||
}
|
||||
|
||||
ABORT (oops);
|
||||
}
|
||||
|
||||
default:
|
||||
ABORT (oops);
|
||||
}
|
||||
}
|
||||
|
||||
isf[isfl] = ASE_NULL;
|
||||
|
||||
if (isfl <= 0)
|
||||
{
|
||||
if (opt.ind >= argc)
|
||||
{
|
||||
/* no source code specified */
|
||||
ABORT (oops);
|
||||
}
|
||||
|
||||
/* the source code is the string, not from the file */
|
||||
ao->ist = ASE_AWK_PARSE_STRING;
|
||||
ao->isp = argv[opt.ind++];
|
||||
}
|
||||
else
|
||||
{
|
||||
ao->ist = ASE_AWK_PARSE_FILES;
|
||||
ao->isp = isf;
|
||||
}
|
||||
|
||||
/* the remaining arguments are input console file names */
|
||||
icfc = (opt.ind >= argc)? 2: (argc - opt.ind + 1);
|
||||
icf = (ase_char_t**) malloc (ASE_SIZEOF(*icf)*icfc);
|
||||
if (icf == ASE_NULL)
|
||||
{
|
||||
out_of_memory ();
|
||||
ABORT (oops);
|
||||
}
|
||||
|
||||
if (opt.ind >= argc)
|
||||
{
|
||||
/* no input(console) file names are specified.
|
||||
* the standard input becomes the input console */
|
||||
icf[icfl++] = ASE_T("");
|
||||
}
|
||||
else
|
||||
{
|
||||
do { icf[icfl++] = argv[opt.ind++]; } while (opt.ind < argc);
|
||||
}
|
||||
icf[icfl] = ASE_NULL;
|
||||
|
||||
ao->osf = osf;
|
||||
ao->icf = icf;
|
||||
ao->icfl = icfl;
|
||||
ao->vm = vm;
|
||||
|
||||
return 0;
|
||||
|
||||
oops:
|
||||
if (vm != ASE_NULL) ase_map_close (vm);
|
||||
if (icf != ASE_NULL) free (icf);
|
||||
if (isf != ASE_NULL) free (isf);
|
||||
return -1;
|
||||
}
|
||||
|
||||
static ase_awk_t* open_awk (void)
|
||||
{
|
||||
ase_awk_t* awk;
|
||||
|
||||
awk = ase_awk_opensimple (0);
|
||||
if (awk == ASE_NULL)
|
||||
{
|
||||
ase_printf (ASE_T("ERROR: cannot open awk\n"));
|
||||
return ASE_NULL;
|
||||
}
|
||||
|
||||
/* TODO: get depth from command line */
|
||||
ase_awk_setmaxdepth (
|
||||
awk, ASE_AWK_DEPTH_BLOCK_PARSE | ASE_AWK_DEPTH_EXPR_PARSE, 50);
|
||||
ase_awk_setmaxdepth (
|
||||
awk, ASE_AWK_DEPTH_BLOCK_RUN | ASE_AWK_DEPTH_EXPR_RUN, 500);
|
||||
|
||||
/*
|
||||
ase_awk_seterrstr (awk, ASE_AWK_EGBLRED,
|
||||
ASE_T("\uC804\uC5ED\uBCC0\uC218 \'%.*s\'\uAC00 \uC7AC\uC815\uC758 \uB418\uC5C8\uC2B5\uB2C8\uB2E4"));
|
||||
ase_awk_seterrstr (awk, ASE_AWK_EAFNRED,
|
||||
ASE_T("\uD568\uC218 \'%.*s\'\uAC00 \uC7AC\uC815\uC758 \uB418\uC5C8\uC2B5\uB2C8\uB2E4"));
|
||||
*/
|
||||
/*ase_awk_setkeyword (awk, ASE_T("func"), 4, ASE_T("FX"), 2);*/
|
||||
|
||||
if (ase_awk_addfunc (awk,
|
||||
ASE_T("sleep"), 5, 0,
|
||||
1, 1, ASE_NULL, bfn_sleep) == ASE_NULL)
|
||||
{
|
||||
ase_awk_close (awk);
|
||||
ase_printf (ASE_T("ERROR: cannot add function 'sleep'\n"));
|
||||
return ASE_NULL;
|
||||
}
|
||||
|
||||
return awk;
|
||||
}
|
||||
|
||||
static int awk_main (int argc, ase_char_t* argv[])
|
||||
{
|
||||
ase_awk_t* awk;
|
||||
|
||||
ase_awk_runcbs_t runcbs;
|
||||
|
||||
int i, file_count = 0;
|
||||
const ase_char_t* mfn = ASE_NULL;
|
||||
int mode = 0;
|
||||
int runarg_count = 0;
|
||||
ase_awk_runarg_t runarg[128];
|
||||
int deparse = 0;
|
||||
struct argout_t ao;
|
||||
|
||||
ase_memset (&ao, 0, ASE_SIZEOF(ao));
|
||||
|
||||
i = handle_args (argc, argv, &ao);
|
||||
if (i == -1)
|
||||
{
|
||||
print_usage (argv[0]);
|
||||
return -1;
|
||||
}
|
||||
if (i == 1) return 0;
|
||||
|
||||
runarg[runarg_count].ptr = NULL;
|
||||
runarg[runarg_count].len = 0;
|
||||
|
||||
awk = open_awk ();
|
||||
if (awk == ASE_NULL) return -1;
|
||||
|
||||
app_awk = awk;
|
||||
|
||||
if (ase_awk_parsesimple (awk, ao.isp, ao.ist, ao.osf) == -1)
|
||||
{
|
||||
ase_printf (
|
||||
ASE_T("PARSE ERROR: CODE [%d] LINE [%u] %s\n"),
|
||||
ase_awk_geterrnum(awk),
|
||||
(unsigned int)ase_awk_geterrlin(awk),
|
||||
ase_awk_geterrmsg(awk)
|
||||
);
|
||||
|
||||
ase_awk_close (awk);
|
||||
return -1;
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
SetConsoleCtrlHandler (stop_run, TRUE);
|
||||
#else
|
||||
signal (SIGINT, stop_run);
|
||||
#endif
|
||||
|
||||
runcbs.on_start = on_run_start;
|
||||
runcbs.on_statement = on_run_statement;
|
||||
runcbs.on_return = on_run_return;
|
||||
runcbs.on_end = on_run_end;
|
||||
runcbs.data = ASE_NULL;
|
||||
|
||||
if (ase_awk_runsimple (awk, ao.icf, &runcbs) == -1)
|
||||
{
|
||||
ase_printf (
|
||||
ASE_T("RUN ERROR: CODE [%d] LINE [%u] %s\n"),
|
||||
ase_awk_geterrnum(awk),
|
||||
(unsigned int)ase_awk_geterrlin(awk),
|
||||
ase_awk_geterrmsg(awk)
|
||||
);
|
||||
|
||||
ase_awk_close (awk);
|
||||
return -1;
|
||||
}
|
||||
|
||||
ase_awk_close (awk);
|
||||
|
||||
if (ao.ist == ASE_AWK_PARSE_FILES && ao.isp != ASE_NULL) free (ao.isp);
|
||||
if (ao.osf != ASE_NULL) free (ao.osf);
|
||||
if (ao.icf != ASE_NULL) free (ao.icf);
|
||||
if (ao.vm != ASE_NULL) ase_map_close (ao.vm);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ase_main (int argc, ase_achar_t* argv[])
|
||||
{
|
||||
int n;
|
||||
|
||||
#if defined(_WIN32) && defined(_DEBUG) && defined(_MSC_VER)
|
||||
_CrtSetDbgFlag (_CRTDBG_LEAK_CHECK_DF | _CRTDBG_ALLOC_MEM_DF);
|
||||
#endif
|
||||
|
||||
n = ase_runmain (argc, argv, awk_main);
|
||||
|
||||
#if defined(_WIN32) && defined(_DEBUG)
|
||||
/*#if defined(_MSC_VER)
|
||||
_CrtDumpMemoryLeaks ();
|
||||
#endif*/
|
||||
#endif
|
||||
|
||||
return n;
|
||||
}
|
121
qse/cmd/awk/comp.awk
Normal file
121
qse/cmd/awk/comp.awk
Normal file
@ -0,0 +1,121 @@
|
||||
BEGIN {
|
||||
OFS="\t\t";
|
||||
|
||||
print "1==1 :", (1 == 1);
|
||||
print "1==0 :", (1 == 0);
|
||||
|
||||
print "1.0==1 :", (1.0 == 1);
|
||||
print "1.1==1 :", (1.1 == 1);
|
||||
|
||||
print "1.0!=1 :", (1.0 != 1);
|
||||
print "1.1!=1 :", (1.1 != 1);
|
||||
|
||||
print "\"abc\" == \"abc\"", ("abc" == "abc");
|
||||
print "\"abc\" != \"abc\"", ("abc" != "abc");
|
||||
|
||||
print "--------------------------";
|
||||
print "a == \"\" :", (a == "");
|
||||
print "a >= \"\" :", (a >= "");
|
||||
print "a <= \"\" :", (a <= "");
|
||||
print "a > \"\" :", (a > "");
|
||||
print "a < \"\" :", (a < "");
|
||||
|
||||
print "--------------------------";
|
||||
print "a == \" \" :", (a == " ");
|
||||
print "a >= \" \" :", (a >= " ");
|
||||
print "a <= \" \" :", (a <= " ");
|
||||
print "a > \" \" :", (a > " ");
|
||||
print "a < \" \" :", (a < " ");
|
||||
|
||||
print "--------------------------";
|
||||
print "\"\" == a :", ("" == a);
|
||||
print "\"\" >= a:", ("" >= a);
|
||||
print "\"\" <= a:", ("" <= a);
|
||||
print "\"\" > a:", ("" > a);
|
||||
print "\"\" < a:", ("" < a);
|
||||
|
||||
print "--------------------------";
|
||||
print "\" \" == a :", (" " == a);
|
||||
print "\" \" >= a:", (" " >= a);
|
||||
print "\" \" <= a:", (" " <= a);
|
||||
print "\" \" > a:", (" " > a);
|
||||
print "\" \" < a:", (" " < a);
|
||||
|
||||
print "--------------------------";
|
||||
print "10 == \"10\"", (10 == "10");
|
||||
print "10 != \"10\"", (10 != "10");
|
||||
print "10 >= \"10\"", (10 >= "10");
|
||||
print "10 <= \"10\"", (10 <= "10");
|
||||
print "10 > \"10\"", (10 > "10");
|
||||
print "10 < \"10\"", (10 < "10");
|
||||
|
||||
print "--------------------------";
|
||||
print "10 == \"11\"", (10 == "11");
|
||||
print "10 != \"11\"", (10 != "11");
|
||||
print "10 >= \"11\"", (10 >= "11");
|
||||
print "10 <= \"11\"", (10 <= "11");
|
||||
print "10 > \"11\"", (10 > "11");
|
||||
print "10 < \"11\"", (10 < "11");
|
||||
|
||||
print "--------------------------";
|
||||
print "11 == \"10\"", (11 == "10");
|
||||
print "11 != \"10\"", (11 != "10");
|
||||
print "11 >= \"10\"", (11 >= "10");
|
||||
print "11 <= \"10\"", (11 <= "10");
|
||||
print "11 > \"10\"", (11 > "10");
|
||||
print "11 < \"10\"", (11 < "10");
|
||||
|
||||
print "--------------------------";
|
||||
print "010 == \"8\"", (010 == "8");
|
||||
print "010 != \"8\"", (010 != "8");
|
||||
print "010 >= \"8\"", (010 >= "8");
|
||||
print "010 <= \"8\"", (010 <= "8");
|
||||
print "010 > \"8\"", (010 > "8");
|
||||
print "010 < \"8\"", (010 < "8");
|
||||
|
||||
print "--------------------------";
|
||||
print "10 == \"10.0\"", (10 == "10.0");
|
||||
print "10 != \"10.0\"", (10 != "10.0");
|
||||
print "10 >= \"10.0\"", (10 >= "10.0");
|
||||
print "10 <= \"10.0\"", (10 <= "10.0");
|
||||
print "10 > \"10.0\"", (10 > "10.0");
|
||||
print "10 < \"10.0\"", (10 < "10.0");
|
||||
|
||||
#OFMT="abc";
|
||||
print "--------------------------";
|
||||
print "10.0 == \"10\"", (10.0 == "10");
|
||||
print "10.0 != \"10\"", (10.0 != "10");
|
||||
print "10.0 >= \"10\"", (10.0 >= "10");
|
||||
print "10.0 <= \"10\"", (10.0 <= "10");
|
||||
print "10.0 > \"10\"", (10.0 > "10");
|
||||
print "10.0 < \"10\"", (10.0 < "10");
|
||||
|
||||
print "--------------------------";
|
||||
print "\"10\" == 10.0", ("10" == 10.0);
|
||||
print "\"10\" != 10.0", ("10" != 10.0);
|
||||
print "\"10\" >= 10.0", ("10" >= 10.0);
|
||||
print "\"10\" <= 10.0", ("10" <= 10.0);
|
||||
print "\"10\" > 10.0", ("10" > 10.0);
|
||||
print "\"10\" < 10.0", ("10" < 10.0);
|
||||
|
||||
print "--------------------------";
|
||||
print "\"10\" == 10.1", ("10" == 10.1);
|
||||
print "\"10\" != 10.1", ("10" != 10.1);
|
||||
print "\"10\" >= 10.1", ("10" >= 10.1);
|
||||
print "\"10\" <= 10.1", ("10" <= 10.1);
|
||||
print "\"10\" > 10.1", ("10" > 10.1);
|
||||
print "\"10\" < 10.1", ("10" < 10.1);
|
||||
|
||||
#a[10] = 2;
|
||||
#print a == 1;
|
||||
|
||||
print (0.234 + 1.01123);
|
||||
print 12345678901234567890E20;
|
||||
print .123;
|
||||
print +.123;
|
||||
print -.123;
|
||||
print .123E-;
|
||||
print +.123E-;
|
||||
print -.123E-;
|
||||
print -.123E- + "123";
|
||||
}
|
1
qse/cmd/awk/cou-001.awk
Normal file
1
qse/cmd/awk/cou-001.awk
Normal file
@ -0,0 +1 @@
|
||||
{ print $1, $3; } # print country name and population
|
15
qse/cmd/awk/cou-001.out
Normal file
15
qse/cmd/awk/cou-001.out
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
print $1,$3;
|
||||
}
|
||||
|
||||
USSR 275
|
||||
Canada 25
|
||||
China 1032
|
||||
USA 237
|
||||
Brazil 134
|
||||
India 746
|
||||
Mexico 78
|
||||
France 55
|
||||
Japan 120
|
||||
Germany 61
|
||||
England 56
|
15
qse/cmd/awk/cou-002.awk
Normal file
15
qse/cmd/awk/cou-002.awk
Normal file
@ -0,0 +1,15 @@
|
||||
BEGIN {
|
||||
FS = "\t";
|
||||
printf ("%10s %6s %5s %s\n\n",
|
||||
"COUNTRY", "AREA", "POP", "CONTINENT");
|
||||
}
|
||||
|
||||
{
|
||||
printf ("%10s %6d %5d %s\n", $1, $2, $3, $4);
|
||||
area = area + $2;
|
||||
pop = pop + $3;
|
||||
}
|
||||
|
||||
END {
|
||||
printf ("\n%10s %6d %5d\n", "TOTAL", area, pop);
|
||||
}
|
29
qse/cmd/awk/cou-002.out
Normal file
29
qse/cmd/awk/cou-002.out
Normal file
@ -0,0 +1,29 @@
|
||||
BEGIN {
|
||||
FS = " ";
|
||||
printf ("%10s %6s %5s %s\n\n","COUNTRY","AREA","POP","CONTINENT");
|
||||
}
|
||||
|
||||
{
|
||||
printf ("%10s %6d %5d %s\n",$1,$2,$3,$4);
|
||||
area = (area + $2);
|
||||
pop = (pop + $3);
|
||||
}
|
||||
|
||||
END {
|
||||
printf ("\n%10s %6d %5d\n","TOTAL",area,pop);
|
||||
}
|
||||
COUNTRY AREA POP CONTINENT
|
||||
|
||||
USSR 8649 275 Asia
|
||||
Canada 3852 25 North America
|
||||
China 3705 1032 Asia
|
||||
USA 3615 237 North America
|
||||
Brazil 3286 134 South America
|
||||
India 1267 746 Asia
|
||||
Mexico 762 78 North America
|
||||
France 211 55 Europe
|
||||
Japan 144 120 Asia
|
||||
Germany 96 61 Europe
|
||||
England 94 56 Europe
|
||||
|
||||
TOTAL 25681 2819
|
1
qse/cmd/awk/cou-003.awk
Normal file
1
qse/cmd/awk/cou-003.awk
Normal file
@ -0,0 +1 @@
|
||||
$3/$2 >= 0.5
|
6
qse/cmd/awk/cou-003.out
Normal file
6
qse/cmd/awk/cou-003.out
Normal file
@ -0,0 +1,6 @@
|
||||
(($3 / $2) >= 0.5)
|
||||
|
||||
India 1267 746 Asia
|
||||
Japan 144 120 Asia
|
||||
Germany 96 61 Europe
|
||||
England 94 56 Europe
|
1
qse/cmd/awk/cou-004.awk
Normal file
1
qse/cmd/awk/cou-004.awk
Normal file
@ -0,0 +1 @@
|
||||
$0 >= "M"
|
5
qse/cmd/awk/cou-004.out
Normal file
5
qse/cmd/awk/cou-004.out
Normal file
@ -0,0 +1,5 @@
|
||||
($0 >= "M")
|
||||
|
||||
USSR 8649 275 Asia
|
||||
USA 3615 237 North America
|
||||
Mexico 762 78 North America
|
1
qse/cmd/awk/cou-005.awk
Normal file
1
qse/cmd/awk/cou-005.awk
Normal file
@ -0,0 +1 @@
|
||||
$1 < $4
|
6
qse/cmd/awk/cou-005.out
Normal file
6
qse/cmd/awk/cou-005.out
Normal file
@ -0,0 +1,6 @@
|
||||
($1 < $4)
|
||||
|
||||
Canada 3852 25 North America
|
||||
Brazil 3286 134 South America
|
||||
Mexico 762 78 North America
|
||||
England 94 56 Europe
|
1
qse/cmd/awk/cou-006.awk
Normal file
1
qse/cmd/awk/cou-006.awk
Normal file
@ -0,0 +1 @@
|
||||
$2 < $3
|
5
qse/cmd/awk/cou-006.out
Normal file
5
qse/cmd/awk/cou-006.out
Normal file
@ -0,0 +1,5 @@
|
||||
($2 < $3)
|
||||
|
||||
India 1267 746 Asia
|
||||
Mexico 762 78 North America
|
||||
France 211 55 Europe
|
1
qse/cmd/awk/cou-007.awk
Normal file
1
qse/cmd/awk/cou-007.awk
Normal file
@ -0,0 +1 @@
|
||||
/Asia/
|
6
qse/cmd/awk/cou-007.out
Normal file
6
qse/cmd/awk/cou-007.out
Normal file
@ -0,0 +1,6 @@
|
||||
/Asia/
|
||||
|
||||
USSR 8649 275 Asia
|
||||
China 3705 1032 Asia
|
||||
India 1267 746 Asia
|
||||
Japan 144 120 Asia
|
1
qse/cmd/awk/cou-008.awk
Normal file
1
qse/cmd/awk/cou-008.awk
Normal file
@ -0,0 +1 @@
|
||||
$4 ~ /Asia/
|
6
qse/cmd/awk/cou-008.out
Normal file
6
qse/cmd/awk/cou-008.out
Normal file
@ -0,0 +1,6 @@
|
||||
($4 ~ /Asia/)
|
||||
|
||||
USSR 8649 275 Asia
|
||||
China 3705 1032 Asia
|
||||
India 1267 746 Asia
|
||||
Japan 144 120 Asia
|
1
qse/cmd/awk/cou-009.awk
Normal file
1
qse/cmd/awk/cou-009.awk
Normal file
@ -0,0 +1 @@
|
||||
$4 !~ /Asia/
|
9
qse/cmd/awk/cou-009.out
Normal file
9
qse/cmd/awk/cou-009.out
Normal file
@ -0,0 +1,9 @@
|
||||
($4 !~ /Asia/)
|
||||
|
||||
Canada 3852 25 North America
|
||||
USA 3615 237 North America
|
||||
Brazil 3286 134 South America
|
||||
Mexico 762 78 North America
|
||||
France 211 55 Europe
|
||||
Germany 96 61 Europe
|
||||
England 94 56 Europe
|
1
qse/cmd/awk/cou-010.awk
Normal file
1
qse/cmd/awk/cou-010.awk
Normal file
@ -0,0 +1 @@
|
||||
$0 ~ /Asia/
|
6
qse/cmd/awk/cou-010.out
Normal file
6
qse/cmd/awk/cou-010.out
Normal file
@ -0,0 +1,6 @@
|
||||
($0 ~ /Asia/)
|
||||
|
||||
USSR 8649 275 Asia
|
||||
China 3705 1032 Asia
|
||||
India 1267 746 Asia
|
||||
Japan 144 120 Asia
|
3
qse/cmd/awk/cou-011.awk
Normal file
3
qse/cmd/awk/cou-011.awk
Normal file
@ -0,0 +1,3 @@
|
||||
$2 !~ /^[0-9]+$/
|
||||
|
||||
|
2
qse/cmd/awk/cou-011.out
Normal file
2
qse/cmd/awk/cou-011.out
Normal file
@ -0,0 +1,2 @@
|
||||
($2 !~ /^[0-9]+$/)
|
||||
|
1
qse/cmd/awk/cou-012.awk
Normal file
1
qse/cmd/awk/cou-012.awk
Normal file
@ -0,0 +1 @@
|
||||
$4 == "Asia" && $3 > 500
|
4
qse/cmd/awk/cou-012.out
Normal file
4
qse/cmd/awk/cou-012.out
Normal file
@ -0,0 +1,4 @@
|
||||
(($4 == "Asia") && ($3 > 500))
|
||||
|
||||
China 3705 1032 Asia
|
||||
India 1267 746 Asia
|
1
qse/cmd/awk/cou-013.awk
Normal file
1
qse/cmd/awk/cou-013.awk
Normal file
@ -0,0 +1 @@
|
||||
$4 == "Asia" || $4 == "Europe"
|
9
qse/cmd/awk/cou-013.out
Normal file
9
qse/cmd/awk/cou-013.out
Normal file
@ -0,0 +1,9 @@
|
||||
(($4 == "Asia") || ($4 == "Europe"))
|
||||
|
||||
USSR 8649 275 Asia
|
||||
China 3705 1032 Asia
|
||||
India 1267 746 Asia
|
||||
France 211 55 Europe
|
||||
Japan 144 120 Asia
|
||||
Germany 96 61 Europe
|
||||
England 94 56 Europe
|
1
qse/cmd/awk/cou-014.awk
Normal file
1
qse/cmd/awk/cou-014.awk
Normal file
@ -0,0 +1 @@
|
||||
$4 ~ /^(Asia|Europe)$/
|
9
qse/cmd/awk/cou-014.out
Normal file
9
qse/cmd/awk/cou-014.out
Normal file
@ -0,0 +1,9 @@
|
||||
($4 ~ /^(Asia|Europe)$/)
|
||||
|
||||
USSR 8649 275 Asia
|
||||
China 3705 1032 Asia
|
||||
India 1267 746 Asia
|
||||
France 211 55 Europe
|
||||
Japan 144 120 Asia
|
||||
Germany 96 61 Europe
|
||||
England 94 56 Europe
|
1
qse/cmd/awk/cou-015.awk
Normal file
1
qse/cmd/awk/cou-015.awk
Normal file
@ -0,0 +1 @@
|
||||
/Asia/ || /Europe/
|
9
qse/cmd/awk/cou-015.out
Normal file
9
qse/cmd/awk/cou-015.out
Normal file
@ -0,0 +1,9 @@
|
||||
(/Asia/ || /Europe/)
|
||||
|
||||
USSR 8649 275 Asia
|
||||
China 3705 1032 Asia
|
||||
India 1267 746 Asia
|
||||
France 211 55 Europe
|
||||
Japan 144 120 Asia
|
||||
Germany 96 61 Europe
|
||||
England 94 56 Europe
|
1
qse/cmd/awk/cou-016.awk
Normal file
1
qse/cmd/awk/cou-016.awk
Normal file
@ -0,0 +1 @@
|
||||
/Asia|Europe/
|
9
qse/cmd/awk/cou-016.out
Normal file
9
qse/cmd/awk/cou-016.out
Normal file
@ -0,0 +1,9 @@
|
||||
/Asia|Europe/
|
||||
|
||||
USSR 8649 275 Asia
|
||||
China 3705 1032 Asia
|
||||
India 1267 746 Asia
|
||||
France 211 55 Europe
|
||||
Japan 144 120 Asia
|
||||
Germany 96 61 Europe
|
||||
England 94 56 Europe
|
1
qse/cmd/awk/cou-017.awk
Normal file
1
qse/cmd/awk/cou-017.awk
Normal file
@ -0,0 +1 @@
|
||||
/Canada/, /USA/
|
5
qse/cmd/awk/cou-017.out
Normal file
5
qse/cmd/awk/cou-017.out
Normal file
@ -0,0 +1,5 @@
|
||||
/Canada/,/USA/
|
||||
|
||||
Canada 3852 25 North America
|
||||
China 3705 1032 Asia
|
||||
USA 3615 237 North America
|
1
qse/cmd/awk/cou-018.awk
Normal file
1
qse/cmd/awk/cou-018.awk
Normal file
@ -0,0 +1 @@
|
||||
/Eurpoe/, /Africa/
|
2
qse/cmd/awk/cou-018.out
Normal file
2
qse/cmd/awk/cou-018.out
Normal file
@ -0,0 +1,2 @@
|
||||
/Eurpoe/,/Africa/
|
||||
|
1
qse/cmd/awk/cou-019.awk
Normal file
1
qse/cmd/awk/cou-019.awk
Normal file
@ -0,0 +1 @@
|
||||
FNR == 1, FNR == 5 { print FILENAME ": " $0; }
|
9
qse/cmd/awk/cou-019.out
Normal file
9
qse/cmd/awk/cou-019.out
Normal file
@ -0,0 +1,9 @@
|
||||
(FNR == 1),(FNR == 5) {
|
||||
print ((FILENAME ": ") $0);
|
||||
}
|
||||
|
||||
cou-en.data: USSR 8649 275 Asia
|
||||
cou-en.data: Canada 3852 25 North America
|
||||
cou-en.data: China 3705 1032 Asia
|
||||
cou-en.data: USA 3615 237 North America
|
||||
cou-en.data: Brazil 3286 134 South America
|
1
qse/cmd/awk/cou-020.awk
Normal file
1
qse/cmd/awk/cou-020.awk
Normal file
@ -0,0 +1 @@
|
||||
FNR <= 5 { print FILENAME ": " $0; }
|
9
qse/cmd/awk/cou-020.out
Normal file
9
qse/cmd/awk/cou-020.out
Normal file
@ -0,0 +1,9 @@
|
||||
(FNR <= 5) {
|
||||
print ((FILENAME ": ") $0);
|
||||
}
|
||||
|
||||
cou-en.data: USSR 8649 275 Asia
|
||||
cou-en.data: Canada 3852 25 North America
|
||||
cou-en.data: China 3705 1032 Asia
|
||||
cou-en.data: USA 3615 237 North America
|
||||
cou-en.data: Brazil 3286 134 South America
|
1
qse/cmd/awk/cou-021.awk
Normal file
1
qse/cmd/awk/cou-021.awk
Normal file
@ -0,0 +1 @@
|
||||
$4 == "Asia" { print $1, 1000 * $2; }
|
8
qse/cmd/awk/cou-021.out
Normal file
8
qse/cmd/awk/cou-021.out
Normal file
@ -0,0 +1,8 @@
|
||||
($4 == "Asia") {
|
||||
print $1,(1000 * $2);
|
||||
}
|
||||
|
||||
USSR 8649000
|
||||
China 3705000
|
||||
India 1267000
|
||||
Japan 144000
|
6
qse/cmd/awk/cou-022.awk
Normal file
6
qse/cmd/awk/cou-022.awk
Normal file
@ -0,0 +1,6 @@
|
||||
#BEGIN { FS = "\t"; OFS = "\t"; }
|
||||
BEGIN { FS = OFS = "\t"; }
|
||||
$4 == "North America" { $4 = "NA"; }
|
||||
$4 == "South America" { $4 = "SA"; }
|
||||
{ print; }
|
||||
|
27
qse/cmd/awk/cou-022.out
Normal file
27
qse/cmd/awk/cou-022.out
Normal file
@ -0,0 +1,27 @@
|
||||
BEGIN {
|
||||
FS = OFS = " ";
|
||||
}
|
||||
|
||||
($4 == "North America") {
|
||||
$4 = "NA";
|
||||
}
|
||||
|
||||
($4 == "South America") {
|
||||
$4 = "SA";
|
||||
}
|
||||
|
||||
{
|
||||
print;
|
||||
}
|
||||
|
||||
USSR 8649 275 Asia
|
||||
Canada 3852 25 NA
|
||||
China 3705 1032 Asia
|
||||
USA 3615 237 NA
|
||||
Brazil 3286 134 SA
|
||||
India 1267 746 Asia
|
||||
Mexico 762 78 NA
|
||||
France 211 55 Europe
|
||||
Japan 144 120 Asia
|
||||
Germany 96 61 Europe
|
||||
England 94 56 Europe
|
2
qse/cmd/awk/cou-023.awk
Normal file
2
qse/cmd/awk/cou-023.awk
Normal file
@ -0,0 +1,2 @@
|
||||
BEGIN { FS = OFS = "\t"; }
|
||||
{ $5 = 1000 * $3 / $2; print; }
|
20
qse/cmd/awk/cou-023.out
Normal file
20
qse/cmd/awk/cou-023.out
Normal file
@ -0,0 +1,20 @@
|
||||
BEGIN {
|
||||
FS = OFS = " ";
|
||||
}
|
||||
|
||||
{
|
||||
$5 = ((1000 * $3) / $2);
|
||||
print;
|
||||
}
|
||||
|
||||
USSR 8649 275 Asia 31.7956
|
||||
Canada 3852 25 North America 6.49013
|
||||
China 3705 1032 Asia 278.543
|
||||
USA 3615 237 North America 65.5602
|
||||
Brazil 3286 134 South America 40.7791
|
||||
India 1267 746 Asia 588.792
|
||||
Mexico 762 78 North America 102.362
|
||||
France 211 55 Europe 260.664
|
||||
Japan 144 120 Asia 833.333
|
||||
Germany 96 61 Europe 635.417
|
||||
England 94 56 Europe 595.745
|
4
qse/cmd/awk/cou-024.awk
Normal file
4
qse/cmd/awk/cou-024.awk
Normal file
@ -0,0 +1,4 @@
|
||||
$4 == "Asia" { pop = pop + $3; n = n + 1; }
|
||||
END { print "Total population of the", n,
|
||||
"Asian countries is", pop, "million.";
|
||||
}
|
9
qse/cmd/awk/cou-024.out
Normal file
9
qse/cmd/awk/cou-024.out
Normal file
@ -0,0 +1,9 @@
|
||||
($4 == "Asia") {
|
||||
pop = (pop + $3);
|
||||
n = (n + 1);
|
||||
}
|
||||
|
||||
END {
|
||||
print "Total population of the",n,"Asian countries is",pop,"million.";
|
||||
}
|
||||
Total population of the 4 Asian countries is 2173 million.
|
6
qse/cmd/awk/cou-025.awk
Normal file
6
qse/cmd/awk/cou-025.awk
Normal file
@ -0,0 +1,6 @@
|
||||
/Asia/ { pop["Asia"] += $3; }
|
||||
/Europe/ { pop["Europe"] += $3; }
|
||||
END { print "Asian population is", pop["Asia"], "million.";
|
||||
print "European population is", pop["Europe"], "million.";
|
||||
}
|
||||
|
14
qse/cmd/awk/cou-025.out
Normal file
14
qse/cmd/awk/cou-025.out
Normal file
@ -0,0 +1,14 @@
|
||||
/Asia/ {
|
||||
pop["Asia"] += $3;
|
||||
}
|
||||
|
||||
/Europe/ {
|
||||
pop["Europe"] += $3;
|
||||
}
|
||||
|
||||
END {
|
||||
print "Asian population is",pop["Asia"],"million.";
|
||||
print "European population is",pop["Europe"],"million.";
|
||||
}
|
||||
Asian population is 2173 million.
|
||||
European population is 172 million.
|
3
qse/cmd/awk/cou-026.awk
Normal file
3
qse/cmd/awk/cou-026.awk
Normal file
@ -0,0 +1,3 @@
|
||||
BEGIN { FS = "\t"; }
|
||||
{ pop[$4] += $3; }
|
||||
END { for (name in pop) print name, pop[name]; }
|
16
qse/cmd/awk/cou-026.out
Normal file
16
qse/cmd/awk/cou-026.out
Normal file
@ -0,0 +1,16 @@
|
||||
BEGIN {
|
||||
FS = " ";
|
||||
}
|
||||
|
||||
{
|
||||
pop[$4] += $3;
|
||||
}
|
||||
|
||||
END {
|
||||
for (name in pop)
|
||||
print name,pop[name];
|
||||
}
|
||||
Europe 172
|
||||
South America 134
|
||||
North America 340
|
||||
Asia 2173
|
17
qse/cmd/awk/cou-027.awk
Normal file
17
qse/cmd/awk/cou-027.awk
Normal file
@ -0,0 +1,17 @@
|
||||
BEGIN { FS = "\t"; }
|
||||
{ pop[$4] += $3; }
|
||||
END {
|
||||
# specifying a postion with + notation seems obsolete for sort
|
||||
# on most platforms.
|
||||
# sort -t'\t' +1rn => sort -t'\t' -k2 -rn
|
||||
|
||||
for (c in pop)
|
||||
printf ("%15s\t%6d\n", c, pop[c]) | "sort -t'\t' -k2 -rn";
|
||||
|
||||
# the following two statements make the program behave
|
||||
# consistently across different platforms.
|
||||
# on some platforms, the sort command output has
|
||||
# been delayed until the program exits.
|
||||
close ("sort -t'\t' -k2 -rn");
|
||||
sleep (1);
|
||||
}
|
18
qse/cmd/awk/cou-027.out
Normal file
18
qse/cmd/awk/cou-027.out
Normal file
@ -0,0 +1,18 @@
|
||||
BEGIN {
|
||||
FS = " ";
|
||||
}
|
||||
|
||||
{
|
||||
pop[$4] += $3;
|
||||
}
|
||||
|
||||
END {
|
||||
for (c in pop)
|
||||
printf ("%15s %6d\n",c,pop[c]) | "sort -t' ' -k2 -rn";
|
||||
close ("sort -t' ' -k2 -rn");
|
||||
sleep (1);
|
||||
}
|
||||
Asia 2173
|
||||
North America 340
|
||||
Europe 172
|
||||
South America 134
|
11
qse/cmd/awk/cou-en.data
Normal file
11
qse/cmd/awk/cou-en.data
Normal file
@ -0,0 +1,11 @@
|
||||
USSR 8649 275 Asia
|
||||
Canada 3852 25 North America
|
||||
China 3705 1032 Asia
|
||||
USA 3615 237 North America
|
||||
Brazil 3286 134 South America
|
||||
India 1267 746 Asia
|
||||
Mexico 762 78 North America
|
||||
France 211 55 Europe
|
||||
Japan 144 120 Asia
|
||||
Germany 96 61 Europe
|
||||
England 94 56 Europe
|
1
qse/cmd/awk/crash01.awk
Normal file
1
qse/cmd/awk/crash01.awk
Normal file
@ -0,0 +1 @@
|
||||
BEGIN { CONVFMT="%s"; printf ("%s\n", 10.34); }
|
9
qse/cmd/awk/crash02.awk
Normal file
9
qse/cmd/awk/crash02.awk
Normal file
@ -0,0 +1,9 @@
|
||||
BEGIN {
|
||||
#CONVFMT="%s";
|
||||
#CONVFMT="%*.*s";
|
||||
#CONVFMT="%*.*f";
|
||||
printf "[[[[[%s]]]]\n", sprintf ("abc %s abc", sprintf ("def %s %s", sprintf ("%s %s %s", "xyz", 1.2342, "xyz"), sprintf ("ttt %s tttt", 123.12)));
|
||||
|
||||
printf "[[[[%s]]]]\n", sprintf ("ttt %s tttt", 123.12);
|
||||
}
|
||||
|
17
qse/cmd/awk/crash04.awk
Normal file
17
qse/cmd/awk/crash04.awk
Normal file
@ -0,0 +1,17 @@
|
||||
BEGIN {
|
||||
|
||||
{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{
|
||||
{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{
|
||||
{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{
|
||||
{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{
|
||||
{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{
|
||||
|
||||
abc = 20;
|
||||
}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
|
||||
}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
|
||||
}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
|
||||
}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
|
||||
}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
|
||||
|
||||
}
|
||||
|
5
qse/cmd/awk/crash05.awk
Normal file
5
qse/cmd/awk/crash05.awk
Normal file
@ -0,0 +1,5 @@
|
||||
BEGIN {
|
||||
a = (((((10+20)))));
|
||||
b = (((((((((((((((((((10+20)))))))))))))))))));
|
||||
c = ((((((((((((((((((((((((((((10 + 20))))))))))))))))))))))))))));
|
||||
}
|
23
qse/cmd/awk/crash08.awk
Normal file
23
qse/cmd/awk/crash08.awk
Normal file
@ -0,0 +1,23 @@
|
||||
function a()
|
||||
{
|
||||
print "aaaa";
|
||||
a();
|
||||
}
|
||||
|
||||
BEGIN {
|
||||
a = (b = 20);
|
||||
print a; print b; for(i=j=1; i< 10; i++) print i, j;
|
||||
|
||||
a += b += 20;
|
||||
print a; print b; for(i=j=1; i< 10; i++) print i, j;
|
||||
|
||||
j = (a < 20)? k = 20: c = 30;
|
||||
print (a < 20)? k = 20: c = 30;
|
||||
print "j=" j;
|
||||
print "k=" k;
|
||||
print "c=" c;
|
||||
|
||||
a();
|
||||
}
|
||||
|
||||
|
13
qse/cmd/awk/descrip.mms
Normal file
13
qse/cmd/awk/descrip.mms
Normal file
@ -0,0 +1,13 @@
|
||||
#
|
||||
# OpenVMS MMS/MMK
|
||||
#
|
||||
|
||||
objects = awk.obj
|
||||
|
||||
CFLAGS = /include="../../.."
|
||||
#CFLAGS = /pointer_size=long /include="../../.."
|
||||
|
||||
aseawk.exe : $(objects)
|
||||
link /executable=aseawk.exe $(objects),[-.-.awk]aseawk/library,[-.-.utl]aseutl/library,[-.-.cmn]asecmn/library
|
||||
|
||||
awk.obj depends_on awk.c
|
1
qse/cmd/awk/emp-001.awk
Normal file
1
qse/cmd/awk/emp-001.awk
Normal file
@ -0,0 +1 @@
|
||||
$3 > 0 { print $1, $2 * $3; }
|
8
qse/cmd/awk/emp-001.out
Normal file
8
qse/cmd/awk/emp-001.out
Normal file
@ -0,0 +1,8 @@
|
||||
($3 > 0) {
|
||||
print $1,($2 * $3);
|
||||
}
|
||||
|
||||
Kathy 40
|
||||
Mark 100
|
||||
Mary 121
|
||||
Susie 76.5
|
1
qse/cmd/awk/emp-002.awk
Normal file
1
qse/cmd/awk/emp-002.awk
Normal file
@ -0,0 +1 @@
|
||||
$3 == 0 { print $1; }
|
6
qse/cmd/awk/emp-002.out
Normal file
6
qse/cmd/awk/emp-002.out
Normal file
@ -0,0 +1,6 @@
|
||||
($3 == 0) {
|
||||
print $1;
|
||||
}
|
||||
|
||||
Beth
|
||||
Dan
|
1
qse/cmd/awk/emp-003.awk
Normal file
1
qse/cmd/awk/emp-003.awk
Normal file
@ -0,0 +1 @@
|
||||
{ print NF, $1, $NF; }
|
10
qse/cmd/awk/emp-003.out
Normal file
10
qse/cmd/awk/emp-003.out
Normal file
@ -0,0 +1,10 @@
|
||||
{
|
||||
print NF,$1,$NF;
|
||||
}
|
||||
|
||||
3 Beth 0
|
||||
3 Dan 0
|
||||
3 Kathy 10
|
||||
3 Mark 20
|
||||
3 Mary 22
|
||||
3 Susie 18
|
1
qse/cmd/awk/emp-004.awk
Normal file
1
qse/cmd/awk/emp-004.awk
Normal file
@ -0,0 +1 @@
|
||||
{ print NR, $0; }
|
10
qse/cmd/awk/emp-004.out
Normal file
10
qse/cmd/awk/emp-004.out
Normal file
@ -0,0 +1,10 @@
|
||||
{
|
||||
print NR,$0;
|
||||
}
|
||||
|
||||
1 Beth 4.00 0
|
||||
2 Dan 3.74 0
|
||||
3 Kathy 4.00 10
|
||||
4 Mark 5.00 20
|
||||
5 Mary 5.50 22
|
||||
6 Susie 4.25 18
|
1
qse/cmd/awk/emp-005.awk
Normal file
1
qse/cmd/awk/emp-005.awk
Normal file
@ -0,0 +1 @@
|
||||
{ print "total pay for", $1, "is", $2 * $3; }
|
10
qse/cmd/awk/emp-005.out
Normal file
10
qse/cmd/awk/emp-005.out
Normal file
@ -0,0 +1,10 @@
|
||||
{
|
||||
print "total pay for",$1,"is",($2 * $3);
|
||||
}
|
||||
|
||||
total pay for Beth is 0
|
||||
total pay for Dan is 0
|
||||
total pay for Kathy is 40
|
||||
total pay for Mark is 100
|
||||
total pay for Mary is 121
|
||||
total pay for Susie is 76.5
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user