Recovered from cvs revision 2007-09-06 08:44:00
This commit is contained in:
parent
3b147b3ebd
commit
495d085cba
@ -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"
|
#include "stdafx.h"
|
||||||
@ -214,16 +214,23 @@ namespace ASE
|
|||||||
|
|
||||||
int StdAwk::CloseFile (File^ file)
|
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;
|
System::IO::StreamReader^ sr = (System::IO::StreamReader^)file->Handle;
|
||||||
sr->Close ();
|
sr->Close ();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
try{
|
||||||
System::IO::StreamWriter^ sw = (System::IO::StreamWriter^)file->Handle;
|
System::IO::StreamWriter^ sw = (System::IO::StreamWriter^)file->Handle;
|
||||||
sw->Close ();
|
sw->Close ();
|
||||||
}
|
}
|
||||||
|
catch (...)
|
||||||
|
|
||||||
|
{
|
||||||
|
System::Diagnostics::Debug::Print ("XXXXXX");
|
||||||
|
}
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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 <ase/awk/awk.h>
|
#include <ase/awk/awk.h>
|
||||||
@ -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)
|
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,
|
static int run_awk (ase_awk_t* awk,
|
||||||
@ -940,6 +940,11 @@ static int awk_main (int argc, ase_char_t* argv[])
|
|||||||
/* specify arguments */
|
/* specify arguments */
|
||||||
mode = 2;
|
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('-'))
|
else if (argv[i][0] == ASE_T('-'))
|
||||||
{
|
{
|
||||||
print_usage (argv[0]);
|
print_usage (argv[0]);
|
||||||
|
19
ase/test/net/AwkForm.Designer.cs
generated
19
ase/test/net/AwkForm.Designer.cs
generated
@ -52,6 +52,7 @@ namespace ase.net
|
|||||||
this.btnAddArgument = new System.Windows.Forms.Button();
|
this.btnAddArgument = new System.Windows.Forms.Button();
|
||||||
this.tbxArgument = new System.Windows.Forms.TextBox();
|
this.tbxArgument = new System.Windows.Forms.TextBox();
|
||||||
this.lbxArguments = new System.Windows.Forms.ListBox();
|
this.lbxArguments = new System.Windows.Forms.ListBox();
|
||||||
|
this.chkStripSpaces = new System.Windows.Forms.CheckBox();
|
||||||
this.tableLayoutPanel1.SuspendLayout();
|
this.tableLayoutPanel1.SuspendLayout();
|
||||||
this.panel1.SuspendLayout();
|
this.panel1.SuspendLayout();
|
||||||
this.panel3.SuspendLayout();
|
this.panel3.SuspendLayout();
|
||||||
@ -77,7 +78,7 @@ namespace ase.net
|
|||||||
// btnRun
|
// btnRun
|
||||||
//
|
//
|
||||||
this.btnRun.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
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.Name = "btnRun";
|
||||||
this.btnRun.Size = new System.Drawing.Size(75, 23);
|
this.btnRun.Size = new System.Drawing.Size(75, 23);
|
||||||
this.btnRun.TabIndex = 2;
|
this.btnRun.TabIndex = 2;
|
||||||
@ -267,6 +268,7 @@ namespace ase.net
|
|||||||
// groupBox1
|
// groupBox1
|
||||||
//
|
//
|
||||||
this.groupBox1.AutoSize = true;
|
this.groupBox1.AutoSize = true;
|
||||||
|
this.groupBox1.Controls.Add(this.chkStripSpaces);
|
||||||
this.groupBox1.Controls.Add(this.chkPassArgumentsToEntryPoint);
|
this.groupBox1.Controls.Add(this.chkPassArgumentsToEntryPoint);
|
||||||
this.groupBox1.Controls.Add(this.btnClearAllArguments);
|
this.groupBox1.Controls.Add(this.btnClearAllArguments);
|
||||||
this.groupBox1.Controls.Add(this.btnAddArgument);
|
this.groupBox1.Controls.Add(this.btnAddArgument);
|
||||||
@ -274,7 +276,7 @@ namespace ase.net
|
|||||||
this.groupBox1.Controls.Add(this.lbxArguments);
|
this.groupBox1.Controls.Add(this.lbxArguments);
|
||||||
this.groupBox1.Location = new System.Drawing.Point(0, 51);
|
this.groupBox1.Location = new System.Drawing.Point(0, 51);
|
||||||
this.groupBox1.Name = "groupBox1";
|
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.TabIndex = 0;
|
||||||
this.groupBox1.TabStop = false;
|
this.groupBox1.TabStop = false;
|
||||||
this.groupBox1.Text = "Arguments";
|
this.groupBox1.Text = "Arguments";
|
||||||
@ -326,6 +328,18 @@ namespace ase.net
|
|||||||
this.lbxArguments.Size = new System.Drawing.Size(147, 134);
|
this.lbxArguments.Size = new System.Drawing.Size(147, 134);
|
||||||
this.lbxArguments.TabIndex = 0;
|
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
|
// AwkForm
|
||||||
//
|
//
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
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.Label label3;
|
||||||
private System.Windows.Forms.Panel panel5;
|
private System.Windows.Forms.Panel panel5;
|
||||||
private System.Windows.Forms.Label label4;
|
private System.Windows.Forms.Label label4;
|
||||||
|
private System.Windows.Forms.CheckBox chkStripSpaces;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user