From 495d085cba4ec0cdf7b1c858247ecb1ade5061cb Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Thu, 6 Sep 2007 23:38:00 +0000 Subject: [PATCH] Recovered from cvs revision 2007-09-06 08:44:00 --- ase/net/StdAwk.cpp | 11 +++++++++-- ase/test/awk/awk.c | 9 +++++++-- ase/test/net/AwkForm.Designer.cs | 19 +++++++++++++++++-- ase/test/net/AwkForm.cs | Bin 5642 -> 6046 bytes 4 files changed, 33 insertions(+), 6 deletions(-) diff --git a/ase/net/StdAwk.cpp b/ase/net/StdAwk.cpp index a58013e4..7a5a658f 100644 --- a/ase/net/StdAwk.cpp +++ b/ase/net/StdAwk.cpp @@ -1,5 +1,5 @@ /* - * $Id: StdAwk.cpp,v 1.9 2007/09/01 15:43:16 bacon Exp $ + * $Id: StdAwk.cpp,v 1.10 2007/09/05 14:42:06 bacon Exp $ */ #include "stdafx.h" @@ -214,15 +214,22 @@ namespace ASE int StdAwk::CloseFile (File^ file) { - if (file->Mode == File::MODE::READ) + if (file->Mode->Equals(File::MODE::READ)) { System::IO::StreamReader^ sr = (System::IO::StreamReader^)file->Handle; sr->Close (); } else { + try{ System::IO::StreamWriter^ sw = (System::IO::StreamWriter^)file->Handle; sw->Close (); + } + catch (...) + + { + System::Diagnostics::Debug::Print ("XXXXXX"); + } } return 0; } diff --git a/ase/test/awk/awk.c b/ase/test/awk/awk.c index e0908a64..78415e1b 100644 --- a/ase/test/awk/awk.c +++ b/ase/test/awk/awk.c @@ -1,5 +1,5 @@ /* - * $Id: awk.c,v 1.13 2007/08/26 14:33:38 bacon Exp $ + * $Id: awk.c,v 1.14 2007/09/05 14:42:06 bacon Exp $ */ #include @@ -791,7 +791,7 @@ static void on_run_end (ase_awk_run_t* run, int errnum, void* custom_data) static void print_usage (const ase_char_t* argv0) { - ase_printf (ASE_T("Usage: %s [-m] [-d] [-a argument]* -f source-file [data-file]*\n"), argv0); + ase_printf (ASE_T("Usage: %s [-m] [-d] [-ns] [-a argument]* -f source-file [data-file]*\n"), argv0); } static int run_awk (ase_awk_t* awk, @@ -940,6 +940,11 @@ static int awk_main (int argc, ase_char_t* argv[]) /* specify arguments */ mode = 2; } + else if (ase_strcmp(argv[i], ASE_T("-ns")) == 0) + { + /* no space stripping */ + opt &= ~ASE_AWK_STRIPSPACES; + } else if (argv[i][0] == ASE_T('-')) { print_usage (argv[0]); diff --git a/ase/test/net/AwkForm.Designer.cs b/ase/test/net/AwkForm.Designer.cs index 5c88b0de..2658ed0c 100644 --- a/ase/test/net/AwkForm.Designer.cs +++ b/ase/test/net/AwkForm.Designer.cs @@ -52,6 +52,7 @@ namespace ase.net this.btnAddArgument = new System.Windows.Forms.Button(); this.tbxArgument = new System.Windows.Forms.TextBox(); this.lbxArguments = new System.Windows.Forms.ListBox(); + this.chkStripSpaces = new System.Windows.Forms.CheckBox(); this.tableLayoutPanel1.SuspendLayout(); this.panel1.SuspendLayout(); this.panel3.SuspendLayout(); @@ -77,7 +78,7 @@ namespace ase.net // btnRun // this.btnRun.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.btnRun.Location = new System.Drawing.Point(76, 303); + this.btnRun.Location = new System.Drawing.Point(78, 327); this.btnRun.Name = "btnRun"; this.btnRun.Size = new System.Drawing.Size(75, 23); this.btnRun.TabIndex = 2; @@ -267,6 +268,7 @@ namespace ase.net // groupBox1 // this.groupBox1.AutoSize = true; + this.groupBox1.Controls.Add(this.chkStripSpaces); this.groupBox1.Controls.Add(this.chkPassArgumentsToEntryPoint); this.groupBox1.Controls.Add(this.btnClearAllArguments); this.groupBox1.Controls.Add(this.btnAddArgument); @@ -274,7 +276,7 @@ namespace ase.net this.groupBox1.Controls.Add(this.lbxArguments); this.groupBox1.Location = new System.Drawing.Point(0, 51); this.groupBox1.Name = "groupBox1"; - this.groupBox1.Size = new System.Drawing.Size(154, 247); + this.groupBox1.Size = new System.Drawing.Size(154, 270); this.groupBox1.TabIndex = 0; this.groupBox1.TabStop = false; this.groupBox1.Text = "Arguments"; @@ -326,6 +328,18 @@ namespace ase.net this.lbxArguments.Size = new System.Drawing.Size(147, 134); this.lbxArguments.TabIndex = 0; // + // chkStripSpaces + // + this.chkStripSpaces.AutoSize = true; + this.chkStripSpaces.Checked = true; + this.chkStripSpaces.CheckState = System.Windows.Forms.CheckState.Checked; + this.chkStripSpaces.Location = new System.Drawing.Point(19, 234); + this.chkStripSpaces.Name = "chkStripSpaces"; + this.chkStripSpaces.Size = new System.Drawing.Size(86, 17); + this.chkStripSpaces.TabIndex = 5; + this.chkStripSpaces.Text = "Strip Spaces"; + this.chkStripSpaces.UseVisualStyleBackColor = true; + // // AwkForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -381,5 +395,6 @@ namespace ase.net private System.Windows.Forms.Label label3; private System.Windows.Forms.Panel panel5; private System.Windows.Forms.Label label4; + private System.Windows.Forms.CheckBox chkStripSpaces; } } diff --git a/ase/test/net/AwkForm.cs b/ase/test/net/AwkForm.cs index 9884e7cf15138a8d21da285b834a1e6b4604e83d..418f8affbd680fbdb41204e3206aa9e1f622d1e5 100644 GIT binary patch delta 114 zcmeCunWw*jhgUk8A%h{CA()|rp@<=qp#aD#U`S+0W=Lfyo*d67Ke>QcV6p_i!Q@SR wTB5-WAq+tbo(us%RRIi+49*O$48fD{^Ev`m#E4^+Ww4%nP)L3=3ojcd0Oqk6>;M1& delta 12 TcmbQI-=(vGhj;S=zJDA59=HUw